Martin MOKREJ? wrote: > Hi, > hostname(1) does not accept -s option to print short hostname, > ie. not foo.bar.baz but only foo. It is required on Tru64Unix 5.1A > during system startup. When hostname from coreutils is found, > the system hostname is set improperly(to "-s").
Many software distributions use the net-tools 'hostname' command instead of the coreutils 'hostname' command. It provides much more capability. Perhaps that would be a good solution for you as well. http://www.tazenda.demon.co.uk/phil/net-tools/ Bob > Please provide full compatibility: > > hostname(1) hostnam= > e(1) > > > > NAME > > hostname - Sets or displays the name of the current host system > > SYNOPSIS > > hostname [-s] [new_name] > > DESCRIPTION > > The hostname command sets or displays the name of the current host syst= > em. > If you use the -s option, the short form of the host name is displayed. > Only the superuser can set the hostname. > > EXAMPLES > > 1. To display the short form of the local host name, enter: > $ hostname -s > host1 > > 2. To change the name of the local host, enter: > # hostname west > > > > > > > > addax.gsf.de# /afs/gsf.de/alpha_dux51/usr/bin/hostname --help > Usage: /afs/gsf.de/alpha_dux51/usr/bin/hostname [NAME] > or: /afs/gsf.de/alpha_dux51/usr/bin/hostname OPTION > Print or set the hostname of the current system. > > --help display this help and exit > --version output version information and exit > > Report bugs to <[EMAIL PROTECTED]>. > addax.gsf.de# rcmgr get HOSTNAME > addax.gsf.de > addax.gsf.de# /afs/gsf.de/alpha_dux51/usr/bin/hostname > addax.gsf.de > addax.gsf.de# /usr/sbin/hostname > addax.gsf.de > addax.gsf.de# /afs/gsf.de/alpha_dux51/usr/bin/hostname -s > addax.gsf.de# /usr/sbin/hostname > -s > addax.gsf.de# > > > --=20 > Martin Mokrejs <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> > PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs > MIPS / Institute for Bioinformatics <http://mips.gsf.de> > GSF - National Research Center for Environment and Health > Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany > tel.: +49-89-3187 3683 , fax:=A0+49-89-3187 3585 > > > _______________________________________________ > Bug-coreutils mailing list > [EMAIL PROTECTED] > http://mail.gnu.org/mailman/listinfo/bug-coreutils > _______________________________________________ Bug-coreutils mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-coreutils
