From 9e6081c8b93a3cfb0631c8d06d9dfe2d315955fe Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Wed, 25 May 2011 22:01:17 +0200 Subject: SuSE 11.4 stuff ... --- src/initramfs/distro-specs/suse/functions-11.4 | 113 +++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 src/initramfs/distro-specs/suse/functions-11.4 (limited to 'src/initramfs/distro-specs') diff --git a/src/initramfs/distro-specs/suse/functions-11.4 b/src/initramfs/distro-specs/suse/functions-11.4 new file mode 100644 index 00000000..6699652d --- /dev/null +++ b/src/initramfs/distro-specs/suse/functions-11.4 @@ -0,0 +1,113 @@ +# Copyright (c) 2011 - OpenSLX GmbH +# +# This program/file is free software distributed under the GPL version 2. +# See http://openslx.org/COPYING +# +# If you have any feedback please consult http://openslx.org/feedback and +# send your feedback to feedback@openslx.org +# +# General information about OpenSLX can be found under http://openslx.org +# +# configuration script for OpenSuSE 11.2 to configure linux stateless clients +# (included by init, hwautocfg, servconfig within InitialRamFS after +# inclusion of the main functions file). This file is the main base for the +# several SuSE distro versions + +# settings of central variables (formerly done via config-*, these variables +# are disputable ...) +# D_DIRINBINDMNT - lists of directories to be created in bind mounted rw +# part of the client filesystem +# D_RODIRSINRW - ReadOnly Directories in RW part of filesystem to save on +# TempFS usage +# D_DIRINDXS - directories in client filesystem which should be present +# anyhow +# +# TODO: id. copy of functions-11.2 to be adapted to 11.3 + +# start portmapper (needed at least for nfs and nis services) +config_portmap () { +# portmap is provided via rpcbind in suse 11.1,2,3,4 +testmkd /mnt/var/lib/rpcbind +rllinker "rpcbind" 4 5 +} +# acpi and powersave daemons, required e.g. to shutdown the machine via +# power button, no need for early start +config_acpi () { +rllinker acpid 22 12 +# dbus is required to run acpid and powersaved +start_dreshal="yes" +} +# configure dbus (inter application communication for kde and gnome), hal +# (hardware abstraction layer - used e.g. by powersaved) +config_dreshal () { +local start=1 +local stop=10 +if [ "x$start_dreshal" = "xyes" ]; then + for dir in /var/lib/misc /var/run/ConsoleKit \ + "/var/run/PolicyKit polkituser:polkituser" \ + "/var/lib/PolicyKit polkituser:polkituser" \ + "/var/run/dbus/at_console/pool"; do + testmkd /mnt${dir} + done + # enable access to removable devices + sed -i /mnt/etc/PolicyKit/PolicyKit.conf \ + -e "s/\(<\/config>\)/ @@new@@\n\1/" \ + -e "s/@@new@@/\n@@return@@\n <\/match>/" \ + -e "s/@@action@@/org.freedesktop.hal.storage.mount-removable/" \ + -e "s/@@return@@/ /" + + if [ -f /mnt/etc/init.d/dbus ] ; then + strinfile "messagebus:" /mnt/etc/passwd || \ + echo "messagebus:x:102:103:User for D-BUS:/var/run/dbus:/bin/false" \ + >> /mnt/etc/passwd + strinfile "messagebus:" /mnt/etc/group || \ + echo "messagebus:!:103:" >> /mnt/etc/group + # create directories and set permissions with user and group id + testmkd /mnt/var/run/dbus messagebus:messagebus + testmkd /mnt/var/lib/dbus + # console-kit-daemon is often not started properly (why ever) + sed -i /mnt/etc/init.d/dbus \ + -e '/start_daemon -f $DBUS_D/a\ +\ \ \ \ \ \ \ \ start_daemon -f /usr/sbin/console-kit-daemon' + + rm -rf /mnt/etc/dbus-1/system.d/*etwork*anager.conf \ + /mnt/etc/dbus-1/system.d/nm-* \ + /mnt/etc/dbus-1/event.d/*NetworkManager* + + rllinker "dbus" $start $stop + fi + if [ -f /mnt/etc/init.d/haldaemon ] ; then + strinfile "haldaemon:" /mnt/etc/passwd || \ + echo "haldaemon:x:106:107:User for haldaemon:/var/run/hal:/bin/false" \ + >> /mnt/etc/passwd + strinfile "haldaemon:" /mnt/etc/group || \ + echo "haldaemon:!:107:" >> /mnt/etc/group + echo -n "" >/mnt/var/lib/misc/PolicyKit.reload + chmod a+x /mnt/var/lib/misc/PolicyKit.reload + # create directories and set permissions with user and group id + for dir in /var/run/hald /var/run/hald/hald-local \ + /var/run/hald/hald-runner /var/cache/hald; do + testmkd /mnt/${dir} haldaemon:haldaemon + done + start=$(($start + 1)) + stop=$(($stop - 1)) + rllinker "haldaemon" $start $stop + fi +fi +} +# function for ntp configuration +config_ntp () { +if [ -e /mnt/etc/init.d/ntp ] ; then + if ! strinfile "ntp:" /mnt/etc/passwd ; then + echo -e "ntp:x:74:65534:NTP daemon:/var/lib/ntp:/bin/false" \ + >>/mnt/etc/passwd + echo -e "ntp:!:13099:0:99999:7:::" >>/mnt/etc/shadow + fi + testmkd /mnt/var/lib/ntp/var/run/ntp + testmkd /mnt/var/db + if [ "x$start_ntp" = "xyes" ] ; then + rllinker "ntp" 7 14 + fi +fi +} + -- cgit v1.2.3-55-g7522