summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--initramfs/distro-specs/gentoo/config-2005.119
-rw-r--r--initramfs/distro-specs/gentoo/functions-2005.1230
-rw-r--r--initramfs/distro-specs/gentoo/functions-2006.117
3 files changed, 46 insertions, 220 deletions
diff --git a/initramfs/distro-specs/gentoo/config-2005.1 b/initramfs/distro-specs/gentoo/config-2005.1
index 2bae4d17..64384a54 100644
--- a/initramfs/distro-specs/gentoo/config-2005.1
+++ b/initramfs/distro-specs/gentoo/config-2005.1
@@ -1,8 +1,15 @@
-# Description: distro specific settings for Gentoo 2005.1
+# Copyright (c) 2006 - RZ Uni Freiburg
+# Copyright (c) 2007 - OpenSLX GmbH
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 23-06-2006
+# This program/file is free software distributed under the GPL version 2.
+# See http://openslx.org/COPYING
#
-# Copyright: (c) 2005,6 - RZ Universitaet Freiburg
+# 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
+#
+# distro specific settings for Gentoo 2005.1
# D_SYSCONFDIR - system wide configuration settings in /etc - sysconfig in
# SuSE and RedHat, default in Debian and Ubuntu, conf.d in Gentoo
@@ -20,4 +27,8 @@
# D_BOOTLOCAL - script for user specified stuff which should be started
# during client bootup, path and file relative to /etc
-# nothing changed yet
+D_DIRINDXS="/var/run/xauth /var/lib/init.d/started /var/lib/nobody \
+/var/lib/texmf /var/lib/nfs/sm \
+/var/lib/misc /var/lib/acpi /var/spool/cron /var/lock/subsys"
+D_INITSCRIPTS="localmount keymaps clock urandom serial alsasound"
+
diff --git a/initramfs/distro-specs/gentoo/functions-2005.1 b/initramfs/distro-specs/gentoo/functions-2005.1
index d3412ca3..b57fe52e 100644
--- a/initramfs/distro-specs/gentoo/functions-2005.1
+++ b/initramfs/distro-specs/gentoo/functions-2005.1
@@ -1,16 +1,24 @@
-# configuration script for Gentoo linux distribution to configure OpenSLX
-# linux diskless clients (executed within initialramfs after genconfig)
+# Copyright (c) 2003 - 2006 - RZ Uni Freiburg
+# Copyright (c) 2006, 2007 - OpenSLX GmbH
#
-# Dirk von Suchodoletz <dirk@goe.net>, 08-07-2006
+# This program/file is free software distributed under the GPL version 2.
+# See http://openslx.org/COPYING
#
-# (c) 2006 - RZ Universitaet Freiburg
-# (c) 2006 - OpenSLX.ORG Project
+# 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 Gentoo linux distribution version 2005.1 to
+# configure OpenSLX linux diskless clients (executed within initialramfs
+# after genconfig). These settings/functions will overwrite settings within
+# the gentoo/functions-default script
# empty functions are defined at the beginning of /etc/functions
# distro specific general function called from servconfig script
config_distro () {
-echo -e "dxs version 4.0a\ninitramfs generation date $date" \
+echo -e "OpenSLX version 4.0.6\ninitramfs generation date $date" \
>> /mnt/etc/gentoo-release
echo -e "# changes made to this file by $0 (initrd from $date)" \
> /etc/rc.conf
@@ -30,171 +38,6 @@ else error "$df_errudev" nonfatal
fi
}
-# linking runlevel scripts
-rllinker () {
-local script="$1"
-local need="$2"
-# empty runlevel links - decision on running certain services is
-# passed via configuration
-ln -s /etc/${D_INITDIR}/$1 /mnt/etc/runlevels/default/$1
-echo $1 >> /mnt/etc/runlevels/default/.critical
-# hack to remove unneeded dependency stuff
-#if [ "$script" != "vmware-prep" ] ; then
-# sed "/depend/,/}/d" /mnt/etc/${D_INITDIR}/$1 > /etc/rls
-# cp /etc/rls /mnt/etc/${D_INITDIR}/$1
-#fi
-}
-
-# setup initial boot scripts (rather strange concept I did not get
-# completely)
-initial_boot () {
-rm /mnt/etc/runlevels/*/.critical 2>/dev/null
-for i in ${D_INITSCRIPTS}; do
- ln -sf /etc${D_INITDIR}/$i /mnt/etc/${D_INITBOOTD}/$i
- echo $i >> /mnt/etc/${D_INITBOOTD}/.critical
- echo $i >> /mnt/etc/runlevels/default/.critical
-done
-}
-
-# 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
-# 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!!)
-d_mkrlscript () {
-local switch="$1"
-local name="$2"
-local info="$3"
-case "$switch" in
- init)
- echo -e "#!/sbin/runskript\n# skeleton of /etc/${D_INITDIR}/$name \
-generated by $0\ndepend() {\n\t:\n}" >/mnt/etc/${D_INITDIR}/$name
- echo -e "\n\nstart() {\n\tebegin \"$info\"" \
- >>/mnt/etc/${D_INITDIR}/$name
- chmod u+x /mnt/etc/${D_INITDIR}/$name
- ;;
- close)
- echo -e "\n}\n\nstop() {\n\t:\n}\n# vim:ts=4" \
- >>/mnt/etc/${D_INITDIR}/$name
- ;;
-esac
-}
-
-# group of functions for the normal runlevels
-# function for ntp configuration (unchecked)
-config_ntp () {
-if [ -e /mnt/etc/${D_INITDIR}/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 &>/dev/null
- if [ "x$start_ntp" = "xinitial" ] ; then
- echo -e "\t# entries added by $0 (InitRamFS from $date)\n\
-\t( ntpdate -s -b $ntp_servers >${LOGFILE} 2>&1 && {\n\t which \
-hwclock &>/dev/null && hwclock -w;} ) &" \
- >>/mnt/etc/${D_INITDIR}/boot.ld
- elif [ "x$start_ntp" = "xyes" ] ; then
- rllinker "ntp"
- fi
-fi
-}
-
-# function for atd (unchecked)
-config_atd () {
-if [ "x$start_atd" = "xyes" ]; then
- rllinker "atd"
-fi
-}
-
-# cron service
-config_cron () {
-if [ "x$start_cron" = "xyes" ] ; then
- if [ -f /mnt/etc/${D_INITDIR}/vixie-cron ] ; then
- :
- else
- error "$df_errcron" nonfatal
- fi
-fi
-}
-
-# syslog service
-config_syslog () {
-if [ "x$start_syslog" = "xyes" ] ; then
- if [ -f /mnt/etc/${D_INITDIR}/syslog-ng ] ; then
- rllinker syslog-ng
- else
- error "$df_errsysl" nonfatal
- fi
-fi
-}
-
-# secure shell service
-config_sshd () {
-if [ "x$start_sshd" = "xyes" ] ; then
- if [ -f /mnt/etc/${D_INITDIR}/sshd ] ; then
- rllinker "sshd"
- else
- error "$df_errsshd" nonfatal
- fi
-fi
-}
-
-# snmp agent for remote monitoring (unchecked)
-config_snmp () {
-if [ "x$start_snmp" = "xyes" ] ; then
- if [ -f /mnt/etc/${D_INITDIR}/snmpd ] ; then
- rllinker "snmpd"
- testmkd /mnt/var/lib/net-snmp >/dev/null 2>&1
- fi
- # fixme!!
- # write service monitor depending on services started
- fi
-}
-
-# configure X display manager (runlevel links and kind of manager)
-config_xdm () {
-if [ -f /mnt/etc/${D_INITDIR}/xdm ] ; then
- sed -e "s,DISPLAYMANAGER=.*,DISPLAYMANAGER=\"xdm\"," -i /mnt/etc/rc.conf
- ln -s /etc/${D_INITDIR}/xdm /mnt/etc/runlevels/boot/xdm
- ln -s /etc/${D_INITDIR}/xdm /mnt/etc/runlevels/default/xdm
- echo "xdm" >> /mnt/etc/runlevels/boot/.critical
-fi
-}
-
-# change entries in rc.conf (most for convenience only)
-config_rc_entry () {
-local var=$1
-local value=$2
-sed -e "s,$var=.*,$var=\"$value\"," -i /mnt/etc/rc.conf
-}
-
-# configure gdm
-config_gdm () {
-config_rc_entry "DISPLAYMANAGER" "gdm"
-# fixme!! check for needed directories and permissions
-#testmkd /mnt/var/lib/gdm
-#testmkd /mnt/var/log/gdm
-#strinfile "gdm:" /mnt/etc/passwd || echo "gdm:x:50:15:Gnome Display Manager \
-#Daemon:/var/lib/gdm:/bin/false" >>/mnt/etc/passwd
-# hack - gdm should be user 50 and shadow group 15
-#chown 50:15 /mnt/var/lib/gdm /mnt/var/log/gdm
-#chmod 0750 /mnt/var/lib/gdm /mnt/var/log/gdm
-#rllinker "gdm" ??
-}
-
-# configure kdm as display manager
-config_kdm () {
-config_rc_entry "DISPLAYMANAGER" "kdm"
-}
-
-# configure bluetooth services
-config_bt () {
-rllinker "bluetooth"
-}
-
# set consolefont
consolefont () {
echo -e "\tsetfont ${CONSOLE_FONT} >${LOGFILE} 2>&1\n" \
@@ -205,8 +48,6 @@ config_rc_entry "CONSOLEFONT" "${CONSOLE_FONT}"
# acpi and powersave
config_acpi () {
rllinker acpid
-# remove dependencies (runs unneeded services ...)
-sed "/depend/,/}/d" -i /mnt/etc/${D_INITDIR}/acpid
}
# configure automounter
@@ -230,46 +71,3 @@ else
fi
}
-# start name service caching daemon (recommended in combination with
-# ldap source as user admin base)
-config_nscd () {
-if [ -f /mnt/etc/${D_INITDIR}/nscd ] ; then
- #testmkd /mnt/var/run/nscd
- rllinker "nscd"
-fi
-}
-
-# start portmapper (needed at least for nfs and nis services - unchecked)
-# gentoo: netmount???
-config_portmap () {
-rllinker "portmap"
-}
-
-# start NIS (fixmee: does the start script is really named ypbind?)
-config_nis () {
-rllinker "ypbind"
-}
-
-# start vmware and vmware preparation services
-config_vmware () {
-rllinker "vmware-prep"
-rllinker "vmware"
-# 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
-}
-
diff --git a/initramfs/distro-specs/gentoo/functions-2006.1 b/initramfs/distro-specs/gentoo/functions-2006.1
index e69de29b..4cdd337b 100644
--- a/initramfs/distro-specs/gentoo/functions-2006.1
+++ b/initramfs/distro-specs/gentoo/functions-2006.1
@@ -0,0 +1,17 @@
+# Copyright (c) 2005 - 2006 - RZ Uni Freiburg
+# Copyright (c) 2007 - 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 Gentoo linux distribution version 2006.1 to
+# configure OpenSLX linux diskless clients (executed within initialramfs
+# after genconfig). These settings/functions will overwrite settings within
+# the gentoo/functions-default script
+
+# no differences from default yet