summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDirk von Suchodoletz2006-05-18 18:22:59 +0200
committerDirk von Suchodoletz2006-05-18 18:22:59 +0200
commit4a445a250111c239073613d2b3eef5d49c57b682 (patch)
treea3dc688cc4d97ca9403ff87c508440a75326ebf2
parentForgot to add automounter to other distros too (at least stub) ... (diff)
downloadcore-4a445a250111c239073613d2b3eef5d49c57b682.tar.gz
core-4a445a250111c239073613d2b3eef5d49c57b682.tar.xz
core-4a445a250111c239073613d2b3eef5d49c57b682.zip
Moved autofs configuration to servconfig, try to load modules for usb
keyboards on fatal errors in initialramfs git-svn-id: http://svn.openslx.org/svn/openslx/ld4@217 95ad53e4-c205-0410-b2fa-d234c58c8868
-rw-r--r--initrd/distro-specs/suse/functions-9.347
-rw-r--r--initrd/distro-specs/ubuntu/functions-5.102
-rwxr-xr-xinitrd/initrd-stuff/bin/servconfig30
-rw-r--r--initrd/initrd-stuff/etc/functions2
-rw-r--r--initrd/initrd-stuff/etc/messages19
5 files changed, 58 insertions, 42 deletions
diff --git a/initrd/distro-specs/suse/functions-9.3 b/initrd/distro-specs/suse/functions-9.3
index 67106f6e..5a81848c 100644
--- a/initrd/distro-specs/suse/functions-9.3
+++ b/initrd/distro-specs/suse/functions-9.3
@@ -349,11 +349,11 @@ echo -e "" > /mnt/etc/opt/kde3/share/config/kdm/backgroundrc
# configure bluetooth services
config_bt () {
- echo -e "# /etc/${D_SYSCONFDIR}/bluetooth - file modified by $0"\
- > /etc/bluetooth
- sed -e "s,START_SERVICES.*,START_SERVICES=\"yes\"," \
- /mnt/etc/${D_SYSCONFDIR}/bluetooth >> /etc/bluetooth
- cp /etc/bluetooth /mnt/etc/${D_SYSCONFDIR}/bluetooth
+echo -e "# /etc/${D_SYSCONFDIR}/bluetooth - file modified by $0"\
+ > /etc/bluetooth
+sed -e "s,START_SERVICES.*,START_SERVICES=\"yes\"," \
+ /mnt/etc/${D_SYSCONFDIR}/bluetooth >> /etc/bluetooth
+cp /etc/bluetooth /mnt/etc/${D_SYSCONFDIR}/bluetooth
}
# consolefont and language
@@ -366,7 +366,7 @@ sed -e "s,RC_LANG=.*,RC_LANG=\"${LANG}\" # added in initrd," \
# acpi and powersave
config_acpi () {
- rllinker powersaved "10" "12"
+rllinker powersaved "10" "12"
}
# configure dbus (inter application communication for kde and gnome), hal
@@ -415,32 +415,9 @@ fi
config_automount () {
if [ -f /mnt/etc/${D_SYSCONFDIR}/autofs ] ; then
testmkd /var/lock/subsys
- 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" \
- > /mnt/etc/auto.misc
- 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 "df_erradir"
- strinstr "/" ${automnt_dir} || error "df_erratpld"
- 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}
- fi
- echo -e "# /etc/${D_SYSCONFDIR}/autofs - file modified by\n#\t$0:\n#" \
- > /etc/autofs
- sed -e "s,AUTOFS_OPTIONS.*,AUTOFS_OPTIONS=\"--timeout 3\"," \
- /mnt/etc/${D_SYSCONFDIR}/autofs >> /etc/autofs
- cp /etc/autofs /mnt/etc/${D_SYSCONFDIR}/autofs
- config_portmap
rllinker "autofs" "18" "04"
+else
+ error "$df_erramt"
fi
}
# start name service caching daemon
@@ -448,6 +425,8 @@ config_nscd () {
if [ -f /mnt/etc/${D_INITDIR}/nscd ] ; then
testmkd /mnt/var/run/nscd
rllinker "nscd" "02" "16"
+else
+ error "$df_errnsc"
fi
}
@@ -458,7 +437,11 @@ rllinker "portmap" "02" "20"
# start NIS
config_nis () {
-rllinker "ypbind" "06" "16"
+if [ -f /mnt/etc/${D_INITDIR}/ypbind ] ; then
+ rllinker "ypbind" "06" "16"
+else
+ error "$df_erryp"
+fi
}
# start vmware
diff --git a/initrd/distro-specs/ubuntu/functions-5.10 b/initrd/distro-specs/ubuntu/functions-5.10
index e3327da0..53408c69 100644
--- a/initrd/distro-specs/ubuntu/functions-5.10
+++ b/initrd/distro-specs/ubuntu/functions-5.10
@@ -17,7 +17,7 @@ preinit () {
echo "dhcp:x:101:101::/nonexistent:/bin/false" >>/etc/passwd
# load unix module to provide sockets
- modprobe ${MODPRV} unix || error "$df_errumod"
+ modprobe ${MODPRV} unix || error "$df_errumod" nonfatal
}
postinit () {
diff --git a/initrd/initrd-stuff/bin/servconfig b/initrd/initrd-stuff/bin/servconfig
index da14ccdc..bb5e7117 100755
--- a/initrd/initrd-stuff/bin/servconfig
+++ b/initrd/initrd-stuff/bin/servconfig
@@ -8,7 +8,7 @@
#
# Copyright: (c) 2006 - RZ Universitaet Freiburg
#
-# Version: 0.1.0c
+# Version: 0.1.1a
# check for configuration files to source
@@ -185,7 +185,35 @@ config_dreshal
config_acpi
# configure automounter
+# if automounter=yes
+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" \
+ > /mnt/etc/auto.misc
+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"
+ 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}
+ # portmapper is needed for remote NFS sources
+ config_portmap
+fi
+echo -e "# /etc/${D_SYSCONFDIR}/autofs - file modified by\n#\t$0:\n#" \
+ > /etc/autofs
+sed -e "s,AUTOFS_OPTIONS.*,AUTOFS_OPTIONS=\"--timeout 3\"," \
+ /mnt/etc/${D_SYSCONFDIR}/autofs >> /etc/autofs
+cp /etc/autofs /mnt/etc/${D_SYSCONFDIR}/autofs
config_automount
+# fi
# configure bluetooth services
config_bt
diff --git a/initrd/initrd-stuff/etc/functions b/initrd/initrd-stuff/etc/functions
index 54eddc42..26a361b6 100644
--- a/initrd/initrd-stuff/etc/functions
+++ b/initrd/initrd-stuff/etc/functions
@@ -55,6 +55,8 @@ if [ -n "$2" ] ; then
[ "$DEBUGLEVEL" -gt 2 ] && usleep 20
else
echo -e "${error_msg}${e_msg}${error_shell}"
+ # load usb modules to have keyboard enabled
+ modprobe -a usbcore uhci-hcd ohci-hcd usbhid 2>&1 >/dev/null
/bin/sh
echo -n "Reboot now? [y]"
read input
diff --git a/initrd/initrd-stuff/etc/messages b/initrd/initrd-stuff/etc/messages
index 98d8b1b2..865774be 100644
--- a/initrd/initrd-stuff/etc/messages
+++ b/initrd/initrd-stuff/etc/messages
@@ -7,7 +7,7 @@
#
# Copyright: (c) 2006 - RZ Universitaet Freiburg
#
-# Version: 0.0.3e
+# Version: 0.0.3f
# messages from init
init_errmsg="functions file contains a lot of script \
@@ -114,8 +114,8 @@ $error_dhcp"
error_ldapcfg=" The configuration via ldap is not implemented yet."
# messages from distro functions
-df_errumod=" Failed to load the \"unix\" module. \
- Problems with Hardware detection\nwill probably arise"
+df_errumod=" Failed to load the \"unix\" module. Problems with Hardware \
+detection\nwill probably arise."
df_errserv="seems not to be installed or start script is not available\n \
so requesting the start of service make no sense. Please disable service\n \
or install the files needed."
@@ -125,15 +125,18 @@ expected."
df_errcron=" The cron start script $df_errserv"
df_errsysl=" The syslog start script $df_errserv"
df_errsshd=" The sshd start script $df_errserv"
+df_erryp=" The NIS client $df_errserv"
df_erramnt=" Automounter $df_errserv"
-df_erradir=" Only one directory level is allowed and the directory should \
-exist (on\n the server) or should be creatable (UnionFS)."
-df_erratpld=" Only toplevel directories \
-are allowed as mount points for user home\n directories. Please set the \
-variable \${automnt_dir} appropriately in\n machine-setup file."
+df_errnsc=" Name Service caching deamon $df_errserv\n This service might \
+be useful to take load from a ldap user directory."
# messages from servconfig
scfg_nfs=" Mount of some NFS source failed ..."
+scfg_erradir=" Only one directory level is allowed and the directory should \
+exist (on\n the server) or should be creatable (UnionFS)."
+scfg_erratpld=" Only toplevel directories \
+are allowed as mount points for user home\n directories. Please set the \
+variable \${automnt_dir} appropriately in\n machine-setup file."
# messages from hwautocfg
hcfg_xcfg=" You should define the variable D_XF86CONFFILE in yours distro \