From 9b51546822b3c217fd669249b05a4a2265d88943 Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Sun, 21 May 2006 13:01:26 +0000 Subject: some fixes for automounter, better timing in init for nbd mounts ... git-svn-id: http://svn.openslx.org/svn/openslx/ld4@227 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initrd/initrd-stuff/bin/servconfig | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'initrd/initrd-stuff/bin/servconfig') diff --git a/initrd/initrd-stuff/bin/servconfig b/initrd/initrd-stuff/bin/servconfig index 78203904..28dede13 100755 --- a/initrd/initrd-stuff/bin/servconfig +++ b/initrd/initrd-stuff/bin/servconfig @@ -4,11 +4,11 @@ # for linux diskless clients (executed within initial # ramdisk) # -# Author(s): Dirk von Suchodoletz , 19-05-2006 +# Author(s): Dirk von Suchodoletz , 21-05-2006 # # Copyright: (c) 2006 - RZ Universitaet Freiburg # -# Version: 0.1.1a +# Version: 0.1.1b # check for configuration files to source @@ -192,24 +192,33 @@ config_acpi # configure automounter # if automounter=yes -echo -e "# /etc/auto.master - file generated by $0:\n\ +if [ -d /mnt/misc ] ; then + echo -e "# /etc/auto.master - file generated by $0:\n\ /misc\t/etc/auto.misc" >/mnt/etc/auto.master -echo -e "# /etc/auto.misc - file generated by $0:\n" \ + echo -e "# /etc/auto.misc - file generated by $0:" >/mnt/etc/auto.misc +else + echo -e "# /etc/auto.master - file generated by $0:\n\ +/misc\t#/etc/auto.misc" >/mnt/etc/auto.master + echo -e "# /etc/auto.misc - file generated by $0:\nautomount for removable \ +devices is mostly deprecated, so /misc is not\nactivated in auto.master." \ > /mnt/etc/auto.misc +fi if [ -n "${automnt_src}" ] ; then # local directory and home directory server from machine-setup [ -z "${automnt_dir}" ] && automnt_dir="/home" # remove leading and trailing slash automnt_dir=${automnt_dir#/} automnt_dir=${automnt_dir%/} - test -d ${automnt_dir} || error "$scfg_erradir" - strinstr "/" ${automnt_dir} || error "$scfg_erratpld" + test -d /${automnt_dir} || error "$scfg_erradir" nonfatal + strinstr "/" ${automnt_dir} || error "$scfg_erratpld" nonfatal echo -e "/${automnt_dir}\t/etc/auto.${automnt_dir}\n" \ >> /mnt/etc/auto.master echo -e "# /etc/auto.${automnt_dir} created by $0:\n" \ > /mnt/etc/auto.${automnt_dir} echo -e "*\t-rsize=32768,wsize=32768,rw\t${automnt_src}/&" \ >> /mnt/etc/auto.${automnt_dir} + # no tempfs needed if automounter operates on /home + [ "${automnt_dir}" = "home" ] && umount -t tmpfs /mnt/home 2>/dev/null # portmapper is needed for remote NFS sources config_portmap fi -- cgit v1.2.3-55-g7522