diff options
author | Dirk von Suchodoletz | 2006-01-30 00:58:33 +0100 |
---|---|---|
committer | Dirk von Suchodoletz | 2006-01-30 00:58:33 +0100 |
commit | 6db93cffbb08d7f4515f9cc51ab7b74fdd7fdb8b (patch) | |
tree | 111b4d8529c0aac1c9d79116916245501541a335 | |
parent | GDM Fix. Nachgezogener Manueller Merge. (diff) | |
download | core-6db93cffbb08d7f4515f9cc51ab7b74fdd7fdb8b.tar.gz core-6db93cffbb08d7f4515f9cc51ab7b74fdd7fdb8b.tar.xz core-6db93cffbb08d7f4515f9cc51ab7b74fdd7fdb8b.zip |
Added simple automounter functionality for user homes. See servconfig,
distrospecific functions for setup and machine-setup for configuration.
git-svn-id: http://svn.openslx.org/svn/openslx/dxs/ld4@47 95ad53e4-c205-0410-b2fa-d234c58c8868
-rw-r--r-- | initrd/distro-specs/suse/functions-9.3 | 54 | ||||
-rw-r--r-- | initrd/distro-specs/ubuntu/functions-5.10 | 35 | ||||
-rwxr-xr-x | initrd/initrd-stuff/bin/servconfig | 6 | ||||
-rw-r--r-- | initrd/initrd-stuff/etc/machine-setup | 6 |
4 files changed, 81 insertions, 20 deletions
diff --git a/initrd/distro-specs/suse/functions-9.3 b/initrd/distro-specs/suse/functions-9.3 index b7c26212..97ca9525 100644 --- a/initrd/distro-specs/suse/functions-9.3 +++ b/initrd/distro-specs/suse/functions-9.3 @@ -4,7 +4,7 @@ # functions file). This file is the main base for the # following SuSE distributions # -# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 29-01-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 30-01-2006 # Blabla # Blub # @@ -174,9 +174,10 @@ sed -e "s,DISPLAYMANAGER=.*,DISPLAYMANAGER=\"$start_xdmcp\"," \ /mnt/etc/sysconfig/displaymanager > /etc/displaymanager cp /etc/displaymanager /mnt/etc/sysconfig/displaymanager # start the display manager as early as possible -ln -sf /etc/init.d/xdm /mnt/etc/init.d/boot.d/S12boot.xdm -ln -sf /etc/init.d/xdm /mnt/etc/init.d/rc5.d/S01xdm -ln -sf /etc/init.d/xdm /mnt/etc/init.d/rc5.d/K20xdm +ln -sf /etc/${D_INITDIR}/xdm /mnt/etc/${D_INITDIR}/rc5.d/S01xdm +ln -sf /etc/${D_INITDIR}/xdm /mnt/etc/${D_INITDIR}/rc5.d/K20xdm +echo -e "\t/etc/init.d/xdm start >${LOGFILE} 2>&1\n" \ + >>/mnt/etc/${D_INITDIR}/boot.ld } # configure X display manager (runlevel links and kind of manager) @@ -310,6 +311,15 @@ config_dm_entry yes } +# configure bluetooth services +config_bt () { + echo -e "# /etc/sysconfig/bluetooth - file modified by $0"\ + > /etc/bluetooth + sed -e "s,START_SERVICES.*,START_SERVICES=\"yes\"," \ + /mnt/etc/sysconfig/bluetooth >> /etc/bluetooth + cp /etc/bluetooth /mnt/etc/sysconfig/bluetooth +} + # consolefont consolefont () { echo -e "\tsetfont ${CONSOLE_FONT} >${LOGFILE} 2>&1\n" \ @@ -358,6 +368,42 @@ if [ "x$start_dreshal" = "xyes" ]; then fi } +# configure automounter +config_automount () { +#if [ -f /etc/${D_INITDIR}/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" + strinstr "/" "${automnt_dir}" && error " 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." nonfatal + automnt_dir=${automnt_dir#/} + echo -e "/home\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/sysconfig/autofs - file modified by\n#\t$0:\n#" \ + > /etc/autofs + sed -e "s,AUTOFS_OPTIONS.*,AUTOFS_OPTIONS=\"--timeout 3\"," \ + /mnt/etc/sysconfig/autofs >> /etc/autofs + cp /etc/autofs /mnt/etc/sysconfig/autofs + config_portmap + rllinker "autofs" "18" "04" +#fi +} + +# start portmapper (needed at least for nfs and nis services) +config_portmap () { +rllinker "portmap" "02" "20" +} + # initialize boot.ld - skript to be executed during early system startup # (before most of the normal boot init scripts) # this script should operate like a normal runlevel script diff --git a/initrd/distro-specs/ubuntu/functions-5.10 b/initrd/distro-specs/ubuntu/functions-5.10 index ba795634..9c7c8ccc 100644 --- a/initrd/distro-specs/ubuntu/functions-5.10 +++ b/initrd/distro-specs/ubuntu/functions-5.10 @@ -1,14 +1,14 @@ -# Description: configuration script for SuSE 10.0 to configure +# Description: configuration script for Ubuntu V5.10 to configure # linux diskless clients (executed within initial # ramdisk after genconfig) # -# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 20-01-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 29-01-2006 # Nico Dietrich # Felix Endres # # Copyright: (c) 2006 - RZ Universitaet Freiburg # -# Version: 0.2.1a +# Version: 0.2.1b # distro specific stuff to initialize preinit () { @@ -157,13 +157,13 @@ PATH=\"\$PATH:/var/X11R6/bin\"" >>/mnt/etc/profile # configure display manager (runlevel links and kind of manager) config_dm () { # should be stated that entries were made (fixmee how??) - sed -e "s,DISPLAYMANAGER=.*,DISPLAYMANAGER=\"$start_xdmcp\"," \ - -e "s,.*_XSERVER.*,DISPLAYMANAGER_STARTS_XSERVER=\"$dsx\"," \ - /mnt/etc/sysconfig/displaymanager > /etc/displaymanager - cp /etc/displaymanager /mnt/etc/sysconfig/displaymanager - -# echo -e "#!/bin/sh\n# entry added by $0: $date\n\ -#(sleep 1; /etc/init.d/xdm start) &" >>/mnt/etc/${D_INITDIR}/boot.ld + #sed -e "s,DISPLAYMANAGER=.*,DISPLAYMANAGER=\"$start_xdmcp\"," \ + # -e "s,.*_XSERVER.*,DISPLAYMANAGER_STARTS_XSERVER=\"$dsx\"," \ + # /mnt/etc/sysconfig/displaymanager > /etc/displaymanager + #cp /etc/displaymanager /mnt/etc/sysconfig/displaymanager + # fixme - different runlevel scripts for diff. displaymanager?? + echo -e "\t/etc/init.d/xdm start >${LOGFILE} 2>&1\n" \ + >>/mnt/etc/${D_INITDIR}/boot.ld ln -sf /etc/init.d/xdm /mnt/etc/init.d/rc5.d/S01xdm ln -sf /etc/init.d/xdm /mnt/etc/init.d/rc5.d/K20xdm } @@ -176,31 +176,36 @@ echo -e "setfont ${CONSOLE_FONT} >${LOGFILE} 2>&1" \ # acpi and powersave config_acpi () { - echo >/dev/null + : } # configure xdm as display manager config_xdm () { - echo >/dev/null + : } # configure gdm as display manager config_gdm () { - echo >/dev/null + : } # configure kdm as display manager config_kdm () { - echo >/dev/null + : } # configure hal, dbus, resmgr and services like that config_dreshal () { if [ "x$start_dreshal" = "xyes" ]; then - echo >/dev/null + : fi } +# configure bluetooth services +config_bt () { +: +} + # initialize boot.ld - skript to be executed during early system startup # (before most of the normal boot init scripts) # this script should operate like a normal runlevel script (fixme!!) diff --git a/initrd/initrd-stuff/bin/servconfig b/initrd/initrd-stuff/bin/servconfig index 0daf0004..3e558545 100755 --- a/initrd/initrd-stuff/bin/servconfig +++ b/initrd/initrd-stuff/bin/servconfig @@ -142,6 +142,12 @@ config_dreshal # acpi and powersave - distro dependent function config_acpi config_acpi +# configure automounter +config_automount + +# configure bluetooth services +config_bt + ####################################################################### # network(ed) services diff --git a/initrd/initrd-stuff/etc/machine-setup b/initrd/initrd-stuff/etc/machine-setup index 343a558c..d9205997 100644 --- a/initrd/initrd-stuff/etc/machine-setup +++ b/initrd/initrd-stuff/etc/machine-setup @@ -6,7 +6,7 @@ # New settings are simply appended, so that they might # overwrite previously defined variables # -# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 18-01-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 30-01-2006 # Blabla # Blub # @@ -76,6 +76,10 @@ cell_server="132.230.6.237 132.230.6.236 132.230.6.235" start_samba="may" netbios_workgroup="dxs-network" +# automounter home (/local_dir - top level directories only) and source +# (server:/path) +automnt_dir="/home" +automnt_src="10.8.4.254:/home" # configure and start vmware services vmware="no" |