--- src/etc/rc.d/diskless 2005/11/19 21:47:32 1.5 +++ src/etc/rc.d/diskless 2007/04/26 23:34:27 1.6 @@ -40,11 +40,9 @@ fi dlv=`/sbin/sysctl -n vfs.nfs.diskless_valid 2> /dev/null` [ ${dlv:=0} -eq 0 ] && exit 0 -name="diskless2" +name="diskless" -# Provide a function for normalizing the mounting of memory -# filesystems. This should allow the rest of the code here to remain -# as close as possible between 5-current and 4-stable. +# Provide a function for normalizing the mounting of memory filesystems. # $1 = size # $2 = mount point # $3 = (optional) bytes-per-inode @@ -52,7 +50,7 @@ mount_md() { if [ -n "$3" ]; then bpi="-i $3" fi - /sbin/mdmfs $bpi -s $1 -M md $2 + /sbin/mount_mfs $bpi -s $1 swap $2 } # If there is a global system configuration file, suck it in. @@ -77,7 +75,7 @@ if (/bin/mkdir /var/.diskless 2> /dev/nu rmdir /var/.diskless else echo "+++ mount_md of /var" - mount_md ${varsize:=32m} /var + mount_md ${varsize:=32768} /var fi if [ ! -d /var/db ]; then @@ -138,7 +136,7 @@ if sysctl vfs.devfs.generation > /dev/nu true elif (/bin/mkdir /dev/.diskless 2> /dev/null); then # if /dev is writable assume it has already been populated - # via rc.diskless1 + # via rc.d/diskless # rmdir /dev/.diskless else @@ -151,7 +149,7 @@ fi # generate our hostname # if [ -z "`hostname -s`" ]; then - hostname=`/bin/kenv dhcp.host-name` + hostname=`/usr/bin/kenv dhcp.host-name` hostname $hostname echo "Hostname is $hostname" fi @@ -160,11 +158,10 @@ fi # build the resolv.conf # if [ ! -e /etc/resolv.conf ]; then - echo domain `/bin/kenv dhcp.domain-name` > /etc/resolv.conf + echo domain `/usr/bin/kenv dhcp.domain-name` > /etc/resolv.conf - set `/bin/kenv dhcp.domain-name-servers` + set `/usr/bin/kenv dhcp.domain-name-servers` for ns in `IFS=','; echo $*`; do echo nameserver $ns >> /etc/resolv.conf; done fi -