summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDirk von Suchodoletz2007-04-28 19:43:28 +0200
committerDirk von Suchodoletz2007-04-28 19:43:28 +0200
commit9af5acc8f93aa53cc7fa15a31a0a8a6e4e713c69 (patch)
treeed7634dcfe5639f4ce4131b72e795c16fdc02f7b
parent* instead of the outdated slxmkramfs, the demuxer now uses the older, but better (diff)
downloadcore-9af5acc8f93aa53cc7fa15a31a0a8a6e4e713c69.tar.gz
core-9af5acc8f93aa53cc7fa15a31a0a8a6e4e713c69.tar.xz
core-9af5acc8f93aa53cc7fa15a31a0a8a6e4e713c69.zip
Cleanup for SuSE stage3, placeholders for 10.3 support added ...
(to be checked if beta is available) git-svn-id: http://svn.openslx.org/svn/openslx/trunk@945 95ad53e4-c205-0410-b2fa-d234c58c8868
-rw-r--r--initramfs/distro-specs/suse/config-10.21
-rw-r--r--initramfs/distro-specs/suse/config-10.340
-rwxr-xr-xinitramfs/distro-specs/suse/files-default/etc/init.d/halt90
-rw-r--r--initramfs/distro-specs/suse/functions-10.220
-rw-r--r--initramfs/distro-specs/suse/functions-10.3222
-rw-r--r--initramfs/initrd-stuff/etc/functions4
6 files changed, 270 insertions, 107 deletions
diff --git a/initramfs/distro-specs/suse/config-10.2 b/initramfs/distro-specs/suse/config-10.2
index 7a4a320c..4db788a9 100644
--- a/initramfs/distro-specs/suse/config-10.2
+++ b/initramfs/distro-specs/suse/config-10.2
@@ -36,5 +36,4 @@ boot.sysctl boot.ipconfig boot.swap"
D_RODIRSINRW="/etc/opt/gnome/gconf /var/adm /var/lib/texmf /var/lib/rpm \
/var/cache/fontconfig"
#D_HWMODTOIGNORE="i8xx-tco ichxrom snd-atiixp-modem intel-rng pata_atiixp"
-D_HWMODTOIGNORE="i8xx-tco ichxrom snd-atiixp-modem intel-rng"
D_XORGBIN=/usr/bin/Xorg
diff --git a/initramfs/distro-specs/suse/config-10.3 b/initramfs/distro-specs/suse/config-10.3
new file mode 100644
index 00000000..7a4a320c
--- /dev/null
+++ b/initramfs/distro-specs/suse/config-10.3
@@ -0,0 +1,40 @@
+# Copyright (c) 2003 - 2006 - RZ Uni Freiburg
+# Copyright (c) 2006, 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
+#
+# Distro specific settings for OpenSuSE 10.2. This configuration might change
+# settings from SuSE default configuration file
+
+# D_SYSCONFDIR - system wide configuration settings - /etc/sysconfig in SuSE
+# D_ETCEXCL - list of files, wildcards to be excluded from /etc when using
+# bind mounts
+# 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
+# D_BINDMNT - any code which is specific in bind mount environment
+# D_RCDIRS - runlevel directories relative to /etc
+# D_XF86CONFFILE - name and location of XFree/Xorg config file, e.g.
+# D_XORGBIN - name of XFree/Xorg server with absolute path
+# /etc/X11/xorg.conf or /etc/X11/XF86config, ...
+# D_XFONTPATH - path(es) where X11 fonts are installed (with trailing /*)
+# D_DEFAULTCOUNTRY - localization (see common functions)
+# D_BOOTLOCAL - script for user specified stuff which should be started
+# during client bootup, path and file relative to /etc
+
+D_INITSCRIPTS="boot.udev boot.proc boot.klog boot.loadmodules boot.clock \
+boot.sysctl boot.ipconfig boot.swap"
+D_RODIRSINRW="/etc/opt/gnome/gconf /var/adm /var/lib/texmf /var/lib/rpm \
+/var/cache/fontconfig"
+#D_HWMODTOIGNORE="i8xx-tco ichxrom snd-atiixp-modem intel-rng pata_atiixp"
+D_HWMODTOIGNORE="i8xx-tco ichxrom snd-atiixp-modem intel-rng"
+D_XORGBIN=/usr/bin/Xorg
diff --git a/initramfs/distro-specs/suse/files-default/etc/init.d/halt b/initramfs/distro-specs/suse/files-default/etc/init.d/halt
deleted file mode 100755
index 65e5b0ad..00000000
--- a/initramfs/distro-specs/suse/files-default/etc/init.d/halt
+++ /dev/null
@@ -1,90 +0,0 @@
-#! /bin/sh
-#
-# Description: Modificated /etc/init.d/halt for use with Diskless
-# X Stations (v4.0)
-# -> replaces /etc/init.d/halt
-#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 13-12-2005
-# Copyright: (c) 2003, 2005 - RZ Universitaet Freiburg
-#
-# Version: 0.0.3a
-#
-# Some parts taken from /etc/init.d/halt by
-#
-# Copyright (c) 1996-2004 SuSE Linux AG, Nuernberg, Germany.
-# All rights reserved.
-
-. /etc/rc.status
-. /etc/sysconfig/clock
-. /etc/sysconfig/suseconfig
-
-#
-# Avoid being interrupted by child or keyboard
-trap "echo" SIGINT SIGSEGV SIGQUIT SIGTERM
-set +e
-
-rc_reset
-case "$0" in
- *halt)
- message="The system is halted."
- command="halt"
- modprobe -q apm &>/dev/null
- if test -e /proc/apm -o -e /proc/acpi -o -e /proc/sys/acpi ; then
- command="halt -p"
- else
- read cmdline < /proc/cmdline
- case "$cmdline" in
- *apm=smp-power-off*|*apm=power-off*)
- command="halt -p" ;;
- esac
- fi
- ;;
- *reboot)
- message="Please stand by while rebooting the system..."
- command="reboot"
- ;;
- *)
- echo "$0: call me as \"halt\" or \"reboot\" please!"
- exit 1
- ;;
-esac
-
-# Write to wtmp file before unmounting /var (only needed with
-# persistent mounted filesystem)
-# $command -w
-
-rc_reset
-echo "Turning off swap"
-sync ; sync
-swapoff -a || rc_failed
-rc_status
-
-UMOUNT_FAILED=false
-rc_reset
-echo "Unmounting file systems and devices"
-for unmount in /media/* ; do
- umount -fnt $unmount &>/dev/null
-done
-umount -fnt /tmp/scratch &>/dev/null
-eject /dev/zip &>/dev/null &
-rc_status -v1
-
-umount -anft noproc,nonfs &>/dev/null
-
-rc_reset
-# maybe we use multiple devices
-if test -f /etc/mdtab -a -x /sbin/mdadd ; then
- echo -n "Disable Multiple Devices"
- /sbin/mdstop -a || rc_failed
- rc_status -v1
-fi
-
-sync
-
-# show "the system is down" message
-if test "$SPLASH" = yes ; then
- /sbin/splash -q -p 65535 -t "isdown"
-fi
-
-echo $message
-exec $command -d -f
diff --git a/initramfs/distro-specs/suse/functions-10.2 b/initramfs/distro-specs/suse/functions-10.2
index c24ad571..2fee60d2 100644
--- a/initramfs/distro-specs/suse/functions-10.2
+++ b/initramfs/distro-specs/suse/functions-10.2
@@ -17,21 +17,18 @@
preinit () {
# fake the existence of some helper binaries/scripts (which are not of any use
# within initialramfs)
-local shell="/bin/sh"
local item
-if [ -x /bin/busybox ] ; then
- shell="/bin/ash"
-else
+if [ ! -x /bin/busybox ] ; then
for item in hwup ifup ; do
- echo -e "#!$shell\n:" >/sbin/${item}
+ echo -e "#!/bin/sh\n:" >/sbin/${item}
done
- mkdir /lib/udev /usr/sbin
+ mkdir -p /lib/udev /usr/sbin
for item in usb_id scsi_id vol_id edd_id ata_id path_id cdrom_id idedma.sh \
mount.sh rename_netiface firmware.sh create_floppy_devices \
trigger_firmware_loading.sh ; do
- echo -e "#!$shell\n# do nothing here\n:" >/lib/udev/${item}
+ echo -e "#!/bin/sh\n# do nothing here\n:" >/lib/udev/${item}
done
- echo -e "#!$shell\n:" >/usr/sbin/alsactl
+ echo -e "#!/bin/sh\n:" >/usr/sbin/alsactl
rm /etc/udev/rules.d/60-persistent-storage.rules 2>/dev/null
chmod u+x /sbin/* /lib/udev/* /usr/sbin/*
echo -e "tty:x:5:\ndisk:x:6:\nlp:x:7:\nkmem:x:9:\nuucp:x:14:\n\
@@ -39,7 +36,7 @@ dialout:x:16:\naudio:x:17:\nvideo:x:33:\nvboxusers:!:1000:" > /etc/group
echo -e "root:x:0:0:::\nasterisk:x:106:16:::" > /etc/passwd
fi
}
-
+# display manager configuration
config_kdm () {
# first define directories for kdm
kdmrcdir=/etc/opt/kde3/share/config/kdm
@@ -52,7 +49,6 @@ config_dm_entry yes
# write configuration file with general config from /etc/functions
config_kdm_template
}
-
# udev service - auto creation of device files
udev_hotplug () {
local result=0
@@ -66,7 +62,6 @@ else error "$df_errudev" nonfatal
fi
return $result
}
-
# configure dbus (inter application communication for kde and gnome), hal
# (hardware abstraction layer - used e.g. by powersaved), resmgr and
# policykitd (resource manager/policykitd - the user gets permissions to
@@ -115,7 +110,6 @@ if [ "x$start_dreshal" = "xyes" ]; then
fi
fi
}
-
# config nfsv4
config_nfsv4 () {
if [ "x$start_nfsv4" = "xyes" ]; then
@@ -134,7 +128,6 @@ echo -e "\t# stuff needed for nfsv4\n\tmount -t rpc_pipefs rpc_pipefs \
rllinker "gssd" "15" "07"
fi
}
-
# prepare virtual machine environment (vmware, vmplayer)
config_vmware () {
rllinker "vmware-prep" "18" "02"
@@ -164,7 +157,6 @@ SUBSYSTEM==\"usb\", ACTION==\"remove\", PROGRAM=\"/var/X11R6/bin/vm-udev\"" \
>> /mnt/etc/udev/rules.d/01-udev-vm.rules
fi
}
-
# set up keytable (function run in hwautocfg)
# kbd runlevel link is in the list of initial runlevel scripts (see
# suse/config-10.2 file)
diff --git a/initramfs/distro-specs/suse/functions-10.3 b/initramfs/distro-specs/suse/functions-10.3
new file mode 100644
index 00000000..c43f2a94
--- /dev/null
+++ b/initramfs/distro-specs/suse/functions-10.3
@@ -0,0 +1,222 @@
+# Copyright (c) 2003 - 2006 - RZ Uni Freiburg
+# Copyright (c) 2006, 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 functions for (Open)SuSE 10.3 which differ from functions
+# defined in general SuSE base definitions ... General changes should be done
+# there, version specific changes for the 10.3 go here.
+
+# some specific stuff to initialize
+preinit () {
+# fake the existence of some helper binaries/scripts (which are not of any use
+# within initialramfs)
+local item
+if [ ! -x /bin/busybox ] ; then
+ for item in hwup ifup ; do
+ echo -e "#!/bin/sh\n:" >/sbin/${item}
+ done
+ mkdir -p /lib/udev /usr/sbin
+ for item in usb_id scsi_id vol_id edd_id ata_id path_id cdrom_id idedma.sh \
+ mount.sh rename_netiface firmware.sh create_floppy_devices \
+ trigger_firmware_loading.sh ; do
+ echo -e "#!/bin/sh\n# do nothing here\n:" >/lib/udev/${item}
+ done
+ echo -e "#!/bin/sh\n:" >/usr/sbin/alsactl
+ rm /etc/udev/rules.d/60-persistent-storage.rules 2>/dev/null
+ chmod u+x /sbin/* /lib/udev/* /usr/sbin/*
+ echo -e "tty:x:5:\ndisk:x:6:\nlp:x:7:\nkmem:x:9:\nuucp:x:14:\n\
+dialout:x:16:\naudio:x:17:\nvideo:x:33:\nvboxusers:!:1000:" > /etc/group
+ echo -e "root:x:0:0:::\nasterisk:x:106:16:::" > /etc/passwd
+fi
+}
+# display manager configuration
+config_kdm () {
+# first define directories for kdm
+kdmrcdir=/etc/opt/kde3/share/config/kdm
+xdmdir=/etc/X11/xdm
+# use different kdmrc than default, since 10.2 in /opt/kde/...
+echo 'XDMOPTIONS="-config /etc/opt/kde3/share/config/kdm/kdmrc"' \
+ >> /mnt/etc/sysconfig/displaymanager
+testmkd /mnt/${kdmrcdir}
+config_dm_entry yes
+# write configuration file with general config from /etc/functions
+config_kdm_template
+}
+# udev service - auto creation of device files
+udev_hotplug () {
+local result=0
+echo "Starting udev"
+if [ -x /bin/udevd ] ; then
+ echo "" > /proc/sys/kernel/hotplug
+ udevd --daemon 2>/dev/null || result=1
+ trigger_device_events
+ usleep 50
+else error "$df_errudev" nonfatal
+fi
+return $result
+}
+# configure dbus (inter application communication for kde and gnome), hal
+# (hardware abstraction layer - used e.g. by powersaved), resmgr and
+# policykitd (resource manager/policykitd - the user gets permissions to
+# devices when loggin on)
+config_dreshal () {
+if [ "x$start_dreshal" = "xyes" ]; then
+ local start="05"
+ local stop="18"
+ if [ -f /mnt/etc/${D_INITDIR}/dbus ] ; then
+ strinfile "messagebus:" /mnt/etc/passwd || \
+ echo "messagebus:x:100:101:User for D-BUS:/var/run/dbus:/bin/false" \
+ >> /mnt/etc/passwd
+ strinfile "messagebus:" /mnt/etc/group || \
+ echo "messagebus:!:101:" >> /mnt/etc/group
+ testmkd /mnt/var/run/dbus
+ # set permissions with userid
+ echo -e "\tchown messagebus:messagebus /var/run/dbus 2>/dev/null" \
+ >>/mnt/etc/${D_INITDIR}/boot.slx
+ rllinker "dbus" "$start" "$stop"
+ fi
+ if [ -f /mnt/etc/${D_INITDIR}/resmgr ] ; then
+ testmkd /mnt/var/run/resmgr/classes
+ start="0"$(expr $start + 1)
+ stop="0"$(expr $start - 1)
+ rllinker "resmgr" "$start" "$stop"
+ fi
+ if [ -f /mnt/etc/${D_INITDIR}/policykitd ] ; then
+ testmkd /mnt/var/run/polkit
+ start="0"$(expr $start + 1)
+ stop="0"$(expr $start - 1)
+ rllinker "policykitd" "$start" "$stop"
+ fi
+ if [ -f /mnt/etc/${D_INITDIR}/haldaemon ] ; then
+ strinfile "haldaemon:" /mnt/etc/passwd || \
+ echo "haldaemon:x:105:103:User for haldaemon:/var/run/hal:/bin/false" \
+ >> /mnt/etc/passwd
+ strinfile "haldaemon:" /mnt/etc/group || \
+ echo "haldaemon:!:103:" >> /mnt/etc/group
+ testmkd /mnt/var/run/hal
+ # set permissions with userid
+ echo -e "\tchown haldaemon:haldaemon /var/run/hal 2>/dev/null" \
+ >>/mnt/etc/${D_INITDIR}/boot.slx
+ start="0"$(expr $start + 1)
+ stop="0"$(expr $start - 1)
+ rllinker "haldaemon" "$start" "$stop"
+ fi
+fi
+}
+# config nfsv4
+config_nfsv4 () {
+if [ "x$start_nfsv4" = "xyes" ]; then
+ testmkd /mnt/var/lib/nfs/rpc_pipefs
+ sed -e "s,NFS_SECURITY_GSS=.*,NFS_SECURITY_GSS=\"yes\"," \
+ -e "s,NFS4_SUPPORT=.*,NFS4_SUPPORT=\"yes\"," \
+ -i /mnt/etc/sysconfig/nfs
+ echo -e "rpc_pipefs\t/var/lib/nfs/rpc_pipefs rpc_pipefs defaults\t 0 0\n\
+nfsd\t\t/proc/fs/nfsd\tnfsd\t\tdefaults\t 0 0" >>/tmp/fstab
+echo -e "\t# stuff needed for nfsv4\n\tmount -t rpc_pipefs rpc_pipefs \
+/var/lib/nfs/rpc_pipefs\n\tmount -t nfsd nfsd /proc/fs/nfsd" \
+>>/mnt/etc/${D_INITDIR}/boot.slx
+ # portmap is required for any NFS
+ config_portmap
+ rllinker "idmapd" "14" "08"
+ rllinker "gssd" "15" "07"
+fi
+}
+# prepare virtual machine environment (vmware, vmplayer)
+config_vmware () {
+rllinker "vmware-prep" "18" "02"
+rllinker "vmware" "20" "02"
+sed -e "s,TARGETS =,TARGETS = vmware-prep," \
+ /mnt/etc/${D_INITDIR}/.depend.start >> /etc/.depend.start
+ echo "vmware-prep: " >> /etc/.depend.start
+ cp /etc/.depend.start /mnt/etc/${D_INITDIR}/.depend.start
+}
+# set up keytable (function run in hwautocfg)
+# kbd runlevel link is in the list of initial runlevel scripts (see
+# suse/config-10.2 file)
+keytable () {
+# remove unneeded components from the startscript
+sed -e "/wanted keytable/,/^fi$/d;/load usb drivers/,/^esac$/d" \
+ -i /mnt/etc/${D_INITDIR}/kbd
+sed -e "s,KEYTABLE=.*,KEYTABLE=\"${KEYTABLE}\"," \
+ -i /mnt/etc/${D_SYSCONFDIR}/keyboard
+rllinker kbd "01" "20"
+}
+
+# consolefont and language (function run in hwautocfg)
+consolefont () {
+sed -e "s,RC_LANG=.*,RC_LANG=\"${LANG}\" # added in initrd," \
+ -i /mnt/etc/${D_SYSCONFDIR}/language
+}
+
+# check the glx and tvout stuff and configure it
+checkgraphix () {
+# test if unionfs
+case "${XMODULE}" in
+ radeon)
+ # IGP is not supported with fglrx driver (at least not in some versions)
+ # comment if it works properly ...
+ if ! strinfile " IGP" /tmp/hwsetup.info ; then
+ # check ${XDESC}/ hwsetup.info device string in Cards file and then
+ # for needed components
+ test -e /mnt/lib/modules/${KERNEL}/kernel/drivers/char/drm/fglrx.ko \
+ && test -e /mnt/usr/lib/xorg/modules/drivers/fglrx_drv.* && {
+ XMODULE=fglrx
+ # it only works for UnionFS enabled systems or put it in preload
+ # but that might be not to clever :-)
+ ln -sf /usr/lib/xorg/libGL.so.1.2 \
+ /mnt/usr/lib/libGL.so.1.2 2>/dev/null || \
+ echo -e "/usr/lib/xorg/libGL.so.1.2\n/usr/lib/xorg/libGL.so.1\n\
+/usr/lib/xorg/libGL.so" >/mnt/etc/ld.so.preload
+ }
+ # check whether to enable tvout
+ if [ -n "$tvout" ] && [ "$tvout" != "no" -a "$tvout" != "NO" ] ; then
+ [ "$tvout" = "yes" ] && tvout="PAL-B"
+ TVOUT='\tOption\t\t"TVFormat" "'$tvout
+ TVOUT=$TVOUT'"\n\tOption\t\t"DesktopSetup" "horizontal"'
+ fi
+ fi
+ ;;
+ nv)
+ # check for needed components
+ test -e /mnt/lib/modules/${KERNEL}/kernel/drivers/char/drm/nvidia.ko \
+ && test -e /mnt/usr/X11R6/lib/modules/drivers/nvidia_drv.* && {
+ gllib=$(ls /mnt/usr/X11R6/lib/libGL.so.1.0.* 2>/dev/null|sed -n "1p")
+ if [ -n "$gllib" ] ; then
+ ln -sf ${gllib#/mnt} /mnt/usr/lib/libGL.so.1 2>/dev/null
+ # same for GLcore lib
+ gllib=$(ls /mnt/usr/X11R6/lib/libGLcore.so.1.0.* 2>/dev/null|\
+ sed -n "1p")
+ ln -sf ${gllib#/mnt} /mnt/usr/lib/libGLcore.so.1.0 2>/dev/null \
+ || fail=1
+ # load server modules (trick put the path before the official one)
+ testmkd /mnt/etc/X11/modules
+ ln -sf /usr/lib/xorg/modules/updates/extensions/libglx.so \
+ /mnt/etc/X11/modules/libglx.so || fail=1
+ ln -sf /usr/lib/xorg/modules/updates/drivers/nvidia_drv.so \
+ /mnt/etc/X11/modules/nvidia_drv.so || fail=1
+ [ -z $fail ] && XMODULE=nvidia
+ # ensure proper permissions for nvidia devices
+ echo -e "# nvidia stuff added by $0 in InitRamFS\nKERNEL==\"nvidia*|nvidiactl*\",\
+GROUP=\"video\",MODE=\"0666\"" > /mnt/etc/udev/rules.d/10-nvidia-devperms.rules
+ fi
+ }
+ ;;
+esac
+}
+
+# Xorg variable settings. Lots of stuff changed since 10.2
+displayvars () {
+Files='\tModulePath\t"/etc/X11/modules"\n
+\tModulePath\t"/usr/lib/xorg/modules"\n
+\tFontPath\t"/usr/share/fonts/misc/:unscaled"\n
+\tFontPath\t"/usr/share/fonts/75dpi/:unscaled"\n
+\tFontPath\t"/usr/share/fonts/100dpi/:unscaled"'
+synapticsdrv="/usr/lib/xorg/modules/input/synaptics_drv.so"
+}
diff --git a/initramfs/initrd-stuff/etc/functions b/initramfs/initrd-stuff/etc/functions
index e3b848b1..936a073a 100644
--- a/initramfs/initrd-stuff/etc/functions
+++ b/initramfs/initrd-stuff/etc/functions
@@ -364,9 +364,9 @@ case "$tftp" in
fi
;;
esac
-# unpack part (only gzip is supported, bzip binary not present in
-# initramfs)
+# unpack part
if [ -s $dst ] ; then
+ # fixme: handle different types of packaging (gzip/bzip2)??
tar -xpzf $dst 2>/dev/null
[ "$DEBUGLEVEL" -le 2 -o "$DEBUGLEVEL" -eq 8 ] && rm $dst
return 0