diff options
Diffstat (limited to 'initramfs/distro-specs/ubuntu/functions-5.10')
-rw-r--r-- | initramfs/distro-specs/ubuntu/functions-5.10 | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/initramfs/distro-specs/ubuntu/functions-5.10 b/initramfs/distro-specs/ubuntu/functions-5.10 new file mode 100644 index 00000000..5b7c7335 --- /dev/null +++ b/initramfs/distro-specs/ubuntu/functions-5.10 @@ -0,0 +1,97 @@ +# configuration script for Ubuntu V5.10 to configure OpenSLX linux diskless +# clients (merged in stage2 with ubuntu/functions-default - and loaded within +# initial ramfs - stage3) It may overwrite settings from the default config +# file (/etc/functions) +# +# Dirk von Suchodoletz <dvs@OpenSLX.com>, 31-08-2006 +# Nico Dietrich +# Felix Endres +# +# (c) 2006 - RZ Universitaet Freiburg +# (c) 2006 - OpenSLX.ORG Project + + +# syslog service +config_syslog () { +if [ "x$start_syslog" = "xyes" ] ; then + echo -e "# /etc/syslog.conf - file generated by $0" >/mnt/etc/syslogd.conf + echo "kern.warn;*.err;authpriv.none\t/dev/tty10\n\ +#kern.warn;*.err;authpriv.none\t|/dev/xconsole\n\ +#*.emerg\n\n*.=warn;*.=err\t\t\t-/var/log/warn\n\ +#*.crit\t\t\t\t/var/log/warn\n*.*;mail.none;news.none\t\t\ +#-/var/log/messages" >> /mnt/etc/syslogd.conf +# test -n "$log_servers" && \ +# for logserver in $log_servers; do +# echo -e "*.*;*.*;*.*;*kern.!*\t@$logserver" >>/mnt/etc/syslog.conf +# done + rllinker "sysklogd" "02" "18" +fi +} + +# secure shell service +config_sshd () { +if [ "x$start_sshd" = "xyes" ] ; then + if [ -f /mnt/etc/init.d/ssh ] ; then + #testmkd /mnt/var/run/sshd + rllinker "ssh" "12" "10" + else + error "$df_errsshd" nonfatal + fi +fi +} + +# snmp agent for remote monitoring +config_snmp () { +if [ "x$start_snmp" = "xyes" ] ; then + if [ -f /mnt/etc/init.d/snmpd ] ; then + rllinker "snmpd" "24" "02" + testmkd /mnt/var/lib/net-snmp >/dev/null 2>&1 + fi + # fixme!! + # write service monitor depending on services started +fi +} + +# consolefont +consolefont () { +echo -e "setfont ${CONSOLE_FONT} >${LOGFILE} 2>&1" \ + >>/mnt/etc/${D_INITDIR}/boot.ld +} +# acpi and powersave +config_acpi () { + rllinker "acpid" "02" "19" + rllinker "acpi-support" "20" "02" +} + +# configure hal, dbus, resmgr and services like that +# fixme: complete or remove (dummy function is present in /etc/functions) +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" "18" "02" +rllinker "vmware" "20" "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, <dvs@OpenSLX.com>\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, <dvs@OpenSLX.com>\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 +} |