uname: make uname -r and -v both print out full version info.

the world seems to expect this, and do this.
This commit is contained in:
Ben Gras 2010-07-21 12:47:48 +00:00
parent f6655c171b
commit 63deb069bb
4 changed files with 8 additions and 12 deletions

View file

@ -1,7 +1,7 @@
#!/bin/sh
TAG=`uname -p`-`uname -r`.`uname -v`
PACKDIR=`uname -p`/`uname -r`.`uname -v`
TAG=`uname -p`-`uname -r`
PACKDIR=`uname -p`/`uname -r`
RC=/usr/etc/rc.package
CDDIR=PACKAGES
CDMP=/mnt

View file

@ -23,7 +23,6 @@
#define SYSNAME ((unsigned) 0x01)
#define NODENAME ((unsigned) 0x02)
#define RELEASE ((unsigned) 0x04)
#define VERSION ((unsigned) 0x08)
#define U_MACHINE ((unsigned) 0x10)
#define ARCH ((unsigned) 0x20)
@ -79,7 +78,7 @@ char **argv;
case 'n': info |= NODENAME; break;
case 'r': info |= RELEASE; break;
case 's': info |= SYSNAME; break;
case 'v': info |= VERSION; break;
case 'v': info |= RELEASE; break;
case 'p': info |= ARCH; break;
default: usage();
}
@ -107,19 +106,16 @@ char **argv;
if ((info & (SYSNAME|NODENAME)) != 0)
print(STDOUT_FILENO, " ", (char *) NULL);
print(STDOUT_FILENO, un.release, (char *) NULL);
}
if ((info & VERSION) != 0) {
if ((info & (SYSNAME|NODENAME|RELEASE)) != 0)
print(STDOUT_FILENO, " ", (char *) NULL);
print(STDOUT_FILENO, ".", (char *) NULL);
print(STDOUT_FILENO, un.version, (char *) NULL);
}
if ((info & U_MACHINE) != 0) {
if ((info & (SYSNAME|NODENAME|RELEASE|VERSION)) != 0)
if ((info & (SYSNAME|NODENAME|RELEASE)) != 0)
print(STDOUT_FILENO, " ", (char *) NULL);
print(STDOUT_FILENO, un.machine, (char *) NULL);
}
if ((info & ARCH) != 0) {
if ((info & (SYSNAME|NODENAME|RELEASE|VERSION|U_MACHINE)) != 0)
if ((info & (SYSNAME|NODENAME|RELEASE|U_MACHINE)) != 0)
print(STDOUT_FILENO, " ", (char *) NULL);
print(STDOUT_FILENO, un.arch, (char *) NULL);
}

View file

@ -58,7 +58,7 @@ hdboot)
"exec mv $rootdir/boot/image /M"
install -d $rootdir/boot/image
su root -c \
"exec mv $rootdir/M $rootdir/boot/image/`uname -r`.`uname -v`"
"exec mv $rootdir/M $rootdir/boot/image/`uname -r`
fi
sh tell_config OS_RELEASE . OS_VERSION >/tmp/mkb.$$

View file

@ -224,7 +224,7 @@ if [ $PACKAGES -ne 0 ]
then mkdir -p $PACKAGEDIR || true
mkdir -p $PACKAGESOURCEDIR || true
rm -f $PACKAGEDIR/List
retrieve $PACKAGEDIR $PACKAGELIST packages/`uname -p`/`uname -r`.`uname -v`
retrieve $PACKAGEDIR $PACKAGELIST packages/`uname -p`/`uname -r`
retrieve $PACKAGESOURCEDIR $PACKAGESOURCELIST software
fi