What is userver?

Posted by: caederus

What is userver? - 15/05/2002 11:28

Looking in /bin, I see a load of things I recognise, together with the
trivial scripts `ro', `rw', `rwm', `rom' and unexecutable `x'. But
what is `userver'? at 367K, it's big enough to do something substantial.
The usage message isn't too helpful:

userver: usage: userver [-dlL1w02] [-p <file>] [-m <maximum>]
[-R <directory>] [-U <user-spec>] [-C <directory>]
[-t <time-spec>] [-a <token>] <local-address> <command> [<arg> ...]

but it suggests some sort of remote file serving capability, as do some of
the internal strings. All my attempts to run it produce one of two error messages:
opening socket: Unrecognized UNSN protocol name
opening socket: Unsupported protocol combination in UNSN

Any ideas? I'm surprised it hasn't been mentioned before, but the bbs search
turns up only a post with a list of the contents of /bin.
Posted by: tfabris

Re: What is userver? - 15/05/2002 11:45

You should try www.Google.com once in a while. It's pretty useful.

http://people.redhat.com/johnsonm/lad/src/userver.c.html
Posted by: caederus

Re: What is userver? - 15/05/2002 12:11

Close, but no cigar.

I had already tried google and found the code snippet you found,
but that program only does unix domain sockets and doesn't have
anything like the complexity of arguments found on the empeg, so it's
probably completely unrelated.

I just found where userver is called: in /empeg/bin/d it is invoked as:
userver -1 -d ip/tcp=9999 tar xf - -C /
This seems to be part of the install or upgrade procedure.

It looks like a very handy tool to have around for bootstrapping
software development. It means we can squirt arbitrary files at
a completely unmodified empeg.
Posted by: tfabris

Re: What is userver? - 15/05/2002 12:16

It looks like a very handy tool to have around for bootstrapping
software development. It means we can squirt arbitrary files at
a completely unmodified empeg.


Cool. Okay, great. Let's do it!
Posted by: caederus

Re: What is userver? - 15/05/2002 12:24

It's so easy. On empeg:
/empeg/bin/d
On a machine with netcat installed:
nc my.empeg.addr 9999 < whatever.tar

That's it! The tar file gets unpacked at /
Posted by: caederus

Re: What is userver? - 15/05/2002 12:36

And it's a way to do easy backup/restore. On empeg:
userver -1 -d ip/tcp=1234 tar cf - /
On a machine with netcat installed:
nc my.empeg.addr 1234 > backup.tar

To restore, proceed as in my previous post.
/empeg/bin/d
nc my.empeg.addr 9999 < backup.tar
Posted by: Roger

Re: What is userver? - 16/05/2002 01:51

It looks like a very handy tool to have around for bootstrapping
software development.


Gee, I guess that never occurred to us .

No, seriously, the 'd' script (and the corresponding userver binary) are what we use to put a new player binary on the empeg, to avoid needing to build (and apply) an upgrade file.

One of the targets of the player Makefile is 'dstrip', which tars up the player binary (and fonts and visuals, etc.), and then sends it (using 'uclient') to the player configured in the Makefile.
Posted by: peter

Re: What is userver? - 16/05/2002 02:53

But what is `userver'? at 367K, it's big enough to do something substantial.

It's a bit like netcat (nc)...

userver [-dlL1w02] [-p <file>] [-m <maximum>] [-R <directory>] [-U <user-spec>] [-C <directory>] [-t <time-spec>] [-a <token>] <local-address> <command> [<arg> ...]

...but aimed at people who don't think nc's command-line syntax is obscure enough.

The package it's from is called libunsn; I think it was written by one of Mike's university friends.

Peter