diff options
Diffstat (limited to 'initrd/distro-specs/ubuntu/functions-6.06')
-rw-r--r-- | initrd/distro-specs/ubuntu/functions-6.06 | 130 |
1 files changed, 15 insertions, 115 deletions
diff --git a/initrd/distro-specs/ubuntu/functions-6.06 b/initrd/distro-specs/ubuntu/functions-6.06 index 4a4030ff..8a6465dc 100644 --- a/initrd/distro-specs/ubuntu/functions-6.06 +++ b/initrd/distro-specs/ubuntu/functions-6.06 @@ -4,6 +4,7 @@ # # Author(s): Dirk von Suchodoletz <dirk@goe.net>, 18-05-2006 # Felix Endres, 30-04-2006 +# Tobias Maier # # Copyright: (c) 2006 - RZ Universitaet Freiburg # @@ -17,83 +18,26 @@ preinit () { } # distro specific function called from servconfig script -config_distro () { -# add the halt link to the 0 and 6 runlevel directories - ln -sf ../init.d/halt /mnt/etc/rc0.d/S90halt - ln -sf ../init.d/reboot /mnt/etc/rc6.d/S90reboot - - # set default runlevel - sed -e "s/.*initdefault/id:${D_INITDEFAULT}:initdefault/" -i /mnt/etc/inittab -} # AUS SuSE-9.3 # udev/hotplug - auto device discovery service # Result: 1 is bad, 0 is good udev_hotplug () { - local result=0 - [ -d /etc/hotplug -a -d /etc/hotplug.d ] || error "$df_errhotpl" nonfatal - echo "Enabling hotplug/udev" - #udevstart && result=0 - #udevtrigger && result=0 - udevd --daemon || result=1 - [ ! -e /sbin/udevsend ] && result=1 - echo "/sbin/udevsend/" > /proc/sys/kernel/hotplug - mkdir -p /dev/.udev/db /dev/.udev/queue - trigger_device_events - return $result +# local result=0 +# [ -d /etc/hotplug -a -d /etc/hotplug.d ] || error "$df_errhotpl" nonfatal +# echo "Enabling hotplug/udev" +# #udevstart && result=0 +# #udevtrigger && result=0 +# udevd --daemon || result=1 +# [ ! -e /sbin/udevsend ] && result=1 +# echo "/sbin/udevsend/" > /proc/sys/kernel/hotplug +# mkdir -p /dev/.udev/db /dev/.udev/queue +# trigger_device_events +# return $result +: } -#JD we do not need this function two times ... and definatly wrong the second time -## distro specific general function called from servconfig script -#config_distro () { -## add the halt link to the 0 and 6 runlevel directories -# ln -sf ../halt /mnt/etc/rc0.d/S90halt -# ln -sf ../reboot /mnt/etc/rc6.d/S90reboot -# -# # set default runlevel -# sed -e "s/.*initdefault/id:${D_INITDEFAULT}:initdefault/" -i /mnt/etc/inittab -#} - -# linking runlevel scripts -rllinker () { -local script="$1" -local start="$2" -local stop="$3" -# empty runlevel links - decision on running certain services is -# passed via configuration -# "stop" seems not to be used in Debian!? - It is. Felix -for i in rc2.d/K$stop$script rc3.d/K$stop$script \ - rc2.d/S$start$script rc3.d/S$start$script ; do - if ! [ -f /mnt/etc/init.d/$script ]; then - echo "Target `pwd`../$script does not exist. Skipping links" - break - else - ln -sf ../init.d/$script /mnt/etc/$i - echo "Linked $script" - fi -done -} - -# group of functions for the normal runlevels - first parameter is start -# second stop (fixme: is "stop" needed in Debian?? - Yep) -# function for ntp configuration -config_ntp () { -if [ -f /mnt/etc/init.d/ntp-server ] ; then -#JD not needed, as the user is created when installing the ntp-server deb -# echo -e "ntp:x:112:112:NTP daemon:/var/lib/ntp:/bin/false" \ -# >>/mnt/etc/passwd -# testmkd /mnt/var/lib/ntp/var/run/ntp &>/dev/null - if [ "$start_ntp" == "initial" ] ; then - echo -e "# entry added by $0: $date" \ - >>/mnt/etc/${D_INITDIR}/boot.ld - echo "ntpdate -s -b $ntp_servers >${LOGFILE} 2>&1 &" \ - >>/mnt/etc/${D_INITDIR}/boot.ld - else - rllinker "ntp-server" "20" "02" - fi -fi -} # function for atd config_atd () { @@ -122,12 +66,6 @@ if [ "x$start_cron" = "xyes" ] ; then fi } -# syslog service -config_syslog () { -if [ "x$start_syslog" = "xyes" ] ; then - : -fi -} # secure shell service config_sshd () { @@ -215,7 +153,7 @@ rllinker "console-screen.sh" "31" "03" # configure gdm as display manager config_gdm () { -rllinker "gdm" "20" "01" +rllinker "gdm" "13" "01" # ln -sf ../${D_INITDIR}/gdm /mnt/etc/rc3.d/S13gdm # ln -sf ../${D_INITDIR}/gdm /mnt/etc/rc6.d/K01gdm echo -e "\t/etc/${D_INITDIR}/gdm start >${LOGFILE} 2>&1\n\ @@ -223,7 +161,7 @@ rllinker "gdm" "20" "01" >${LOGFILE} 2>&1) &\n" >>/mnt/etc/${D_INITDIR}/boot.ld # append gdm user echo "gdm:x:113:">>/etc/group - echo "gdm:x:106:113:Gnome Display Manager + echo "gdm:x:106:113:Gnome Display Manager" >> /etc/shadow echo -e "# /etc/gdm/gdm.conf - file generated by $0\n\ @@ -333,44 +271,6 @@ fi } -# configure kdm as display manager -config_kdm () { - : -} - config_automount () { rllinker "autofs" "19" "19" } - -# configure hal, dbus, resmgr and services like that -config_dreshal () { -if [ "x$start_dreshal" = "xyes" ]; then - : -fi -} - - -# fixme!! taken from SuSE10.0 untested here ... -# prepare virtual machine environment (vmware, vmplayer) -config_vmware () { -rllinker "vmware-prep" "22" "02" -rllinker "vmware" "24" "02" -# during vmware sessions linux should not handle usb events/devices -testmkd /mnt/var/X11R6/bin -echo '#!/bin/sh'>> /mnt/etc/udev/rules.d/01-udev-vm.rules -echo -e "# Script for blocking linux from handling usb \ -devices\n# during vmware sessions. If you like to remove certain modules \ -add them\n# to the list below - Dirk von Suchodoletz, <dirk@goe.net>\n\ -STATE=1\nps aux|grep -i vmware|grep -v \"grep\" &>/dev/null && { STATE=0; \ -/sbin/rmmod usb-storage &>/tmp/null; }\n\ -[ x$ACTION = xremove ] && { [ $STATE = 0 ] && /sbin/rmmod usb-storage \ -&>/dev/null; }\nexit \$STATE" > /mnt/var/X11R6/bin/vm-udev -chmod u+x /mnt/var/X11R6/bin/vm-udev -echo -e "# special entry to block linux from reacting to usb events during \ -running\n# vmware sessions, generated by $0 during initramfs\n# Dirk von \ -Suchodoletz, <dirk@goe.net>\nSUBSYSTEM==\"usb\", ACTION==\"add\", \ -PROGRAM=\"/var/X11R6/bin/vm-udev\", OPTIONS=\"ignore_device\"\n\ -SUBSYSTEM==\"usb\", ACTION==\"remove\", PROGRAM=\"/var/X11R6/bin/vm-udev\" \ - " >> /mnt/etc/udev/rules.d/01-udev-vm.rules -} - |