# 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.4 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.4 # 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 () { if [ "x$start_dreshal" = "xyes" ]; then # create directories and set permissions with user and group id for dir in "/var/lib/misc" "/var/run/ConsoleKit" \ "/var/lib/dbus" \ "/var/lib/polkit-1/localauthority" \ "/var/run/dbus messagebus:messagebus"; do testmkd /mnt${dir} done 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 rm -rf /mnt/etc/dbus-1/system.d/*etwork*anager.conf \ /mnt/etc/dbus-1/system.d/nm-* rllinker "dbus" 1 20 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 touch /mnt/var/db/ntp-kod if [ "x$start_ntp" = "xyes" ] ; then rllinker "ntp" 2 14 fi fi }