summaryrefslogtreecommitdiffstats
path: root/initrd/initrd-stuff/bin/servconfig
diff options
context:
space:
mode:
Diffstat (limited to 'initrd/initrd-stuff/bin/servconfig')
-rwxr-xr-xinitrd/initrd-stuff/bin/servconfig21
1 files changed, 15 insertions, 6 deletions
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 <dirk@goe.net>, 19-05-2006
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 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