summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDirk von Suchodoletz2006-12-14 02:08:26 +0100
committerDirk von Suchodoletz2006-12-14 02:08:26 +0100
commitc58ffaa2fd468b69d93a607e0db5e6ec74d7b2ba (patch)
treed76053b5d47c200c67318dd38d0cb013d01d8d58
parentdxs2tgz is replaced by Makefile (diff)
downloadcore-c58ffaa2fd468b69d93a607e0db5e6ec74d7b2ba.tar.gz
core-c58ffaa2fd468b69d93a607e0db5e6ec74d7b2ba.tar.xz
core-c58ffaa2fd468b69d93a607e0db5e6ec74d7b2ba.zip
First steps to include (open)SuSE10.2 into SLX environment (see #98). Tried to fix
the /dev/nvidia* permissions (failed, see #92 too)... git-svn-id: http://svn.openslx.org/svn/openslx/trunk@534 95ad53e4-c205-0410-b2fa-d234c58c8868
-rw-r--r--initramfs/distro-specs/suse/config-10.228
-rw-r--r--initramfs/distro-specs/suse/functions-10.15
-rw-r--r--initramfs/distro-specs/suse/functions-10.2179
-rw-r--r--initramfs/distro-specs/suse/functions-default17
-rwxr-xr-xinitramfs/initrd-stuff/bin/hwautocfg7
-rwxr-xr-xinitramfs/initrd-stuff/bin/servconfig4
-rw-r--r--initramfs/initrd-stuff/etc/functions4
-rwxr-xr-xinitramfs/mkdxsinitrd8
-rwxr-xr-xinitramfs/slxmkramfs6
-rw-r--r--installer/distro-specs/exclude-suse-10.12
l---------installer/distro-specs/exclude-suse-10.21
11 files changed, 243 insertions, 18 deletions
diff --git a/initramfs/distro-specs/suse/config-10.2 b/initramfs/distro-specs/suse/config-10.2
new file mode 100644
index 00000000..7229f9c7
--- /dev/null
+++ b/initramfs/distro-specs/suse/config-10.2
@@ -0,0 +1,28 @@
+# distro specific settings for SuSE 10.1. This configuration might change
+# settings from SuSE default configuration file
+#
+# Dirk von Suchodoletz <dirk@goe.net>, 15-07-2006
+#
+# (c) 2003, 2006 - RZ Universitaet Freiburg
+# (c) 2006 OpenSLX.org Project
+
+# 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.
+# /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="kbd boot.udev boot.proc boot.klog boot.loadmodules boot.clock boot.sysctl boot.ipconfig boot.swap"
+D_RODIRSINRW="/etc/opt/gnome/gconf /etc/X11/xkb /var/adm /var/lib/texmf /var/lib/rpm /var/cache/fontconfig"
diff --git a/initramfs/distro-specs/suse/functions-10.1 b/initramfs/distro-specs/suse/functions-10.1
index 67e7d324..14169bcf 100644
--- a/initramfs/distro-specs/suse/functions-10.1
+++ b/initramfs/distro-specs/suse/functions-10.1
@@ -2,7 +2,7 @@
# in general SuSE base definitions ... General changes should be done there,
# version specific changes for the 10.1 go here.
#
-# Dirk von Suchodoletz <dvs@OpenSLX.com>, 20-11-2006
+# Dirk von Suchodoletz <dvs@OpenSLX.com>, 14-12-2006
#
# (c) 2006 - RZ Universitaet Freiburg
# (c) 2006 - OpenSLX.ORG Project
@@ -160,6 +160,9 @@ case "${XMODULE}" in
ln -sf /usr/X11R6/lib/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 - does not work for some reason
+ #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
}
;;
diff --git a/initramfs/distro-specs/suse/functions-10.2 b/initramfs/distro-specs/suse/functions-10.2
new file mode 100644
index 00000000..a1985662
--- /dev/null
+++ b/initramfs/distro-specs/suse/functions-10.2
@@ -0,0 +1,179 @@
+# configuration functions for SuSE 10.2 which differ from functions defined
+# in general SuSE base definitions ... General changes should be done there,
+# version specific changes for the 10.2 go here.
+#
+# Dirk von Suchodoletz <dvs@OpenSLX.com>, 14-12-2006
+#
+# (c) 2006 - RZ Universitaet Freiburg
+# (c) 2006 - OpenSLX.ORG Project
+
+# some specific stuff to initialize
+preinit () {
+# fake the existence of some helper binaries (which are not of any use
+# within initialramfs)
+shell="/bin/sh"
+[ -x /bin/busybox ] && shell="/bin/ash"
+for i in hwup ifup ; do
+ echo -e "#!$shell\n:" >/sbin/$i
+done
+mkdir /lib/udev /usr/sbin
+for i 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 ; do
+ echo -e "#!$shell\n:" >/lib/udev/$i
+done
+echo -e "#!$shell\n:" >/usr/sbin/alsactl
+rm /etc/udev/rules.d/60-persistent-storage.rules 2>/dev/null
+chmod u+x /sbin/* /lib/udev/* /usr/sbin/*
+}
+
+# udev service
+udev_hotplug () {
+local result=0
+echo "Starting udev"
+# might be used if busybox is available
+#mknod /dev/console c 5 1
+#mknod /dev/null c 1 3
+#mknod /dev/kmsg c 1 11
+if [ -x /bin/udevd ] ; then
+ echo "" > /proc/sys/kernel/hotplug
+ udevd --daemon || result=1
+ trigger_device_events
+ usleep 50
+else error "$df_errudev" nonfatal
+fi
+return $result
+}
+
+# acpi and powersave
+config_acpi () {
+rllinker acpid "10" "12"
+rllinker powersaved "11" "11"
+}
+
+# afs client
+# configure afs client
+config_afs () {
+if [ "x$start_afs" = "xyes" ] ; then
+ if [ -f /mnt/etc/init.d/openafs-client ] ; then
+ test -d /mnt/afs || error "${df_errafsd}"
+ testmkd /mnt/var/cache/openafs
+ rllinker "openafs-client" "15" "06"
+ # echo -e "# /etc/sysconfig/afs-client - file generated by \
+ #$0:\n#\t$date\n" >/etc/sysconfig/afs-client.new;
+ # sed -e "s,THIS_CELL_SERVER.*,THIS_CELL_SERVER=\"$cell_serv\"," \
+ # -e "s,PREFERREDSERVERS.*,PREFERREDSERVERS=\"$cell_serv\"," \
+ # -e "s,THIS_CELL.*,THIS_CELL=\"$this_cell\"," \
+ # -e "s,MEMCACHE.*,MEMCACHE=\"yes\"," \
+ # /etc/sysconfig/afs-client >> \
+ # /etc/sysconfig/afs-client.new
+ # mv /etc/sysconfig/afs-client.new /etc/sysconfig/afs-client
+ else
+ error "${df_errafsn}" nonfatal
+ fi
+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
+# during vmware sessions linux should not handle usb events/devices
+# vmplayer and recent versions of vmware do not need this hack
+if [ ! -x /mnt/usr/bin/vmplayer ] ; then
+ testmkd /mnt/var/X11R6/bin
+ echo '#!/bin/sh'> /mnt/var/X11R6/bin/vm-udev
+ 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
+fi
+}
+
+# set up keytable (function run in hwautocfg)
+# kbd runlevel link is in the list of initial runlevel scripts (see
+# config-10.1 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
+}
+
+# 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)
+ # 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/X11R6/lib/modules/drivers/fglrx_drv.* && {
+ XMODULE=fglrx
+ # it only works for UnionFS enabled systems
+ ln -sf /usr/X11R6/lib/libGL.so.1.2 \
+ /mnt/usr/X11R6/lib/libGL.so.1 2>/dev/null
+ }
+ # 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
+ ;;
+ 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/X11R6/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/X11R6/lib/libGLcore.so.1 2>/dev/null \
+ || fail=1
+ # load server modules (trick put the path before the official one)
+ testmkd /mnt/etc/X11/modules
+ ln -sf /usr/X11R6/lib/modules/updates/extensions/libglx.so \
+ /mnt/etc/X11/modules/libglx.so || fail=1
+ ln -sf /usr/X11R6/lib/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 from 10.1 to 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"'
+}
diff --git a/initramfs/distro-specs/suse/functions-default b/initramfs/distro-specs/suse/functions-default
index 83ef893f..c7014adf 100644
--- a/initramfs/distro-specs/suse/functions-default
+++ b/initramfs/distro-specs/suse/functions-default
@@ -3,7 +3,7 @@
# inclusion of the main functions file). This file is the main base for the
# several SuSE distro versions
#
-# Dirk von Suchodoletz <dvs@OpenSLX.com>, 29-10-2006
+# Dirk von Suchodoletz <dvs@OpenSLX.com>, 14-12-2006
# mj0 09-11-2006
#
# (c) 2006 - RZ Universitaet Freiburg
@@ -295,6 +295,7 @@ config_kdm () {
config_dm_entry yes
usetheme=false
themeconf=$(ls /mnt/var/lib/openslx/themes/displaymanager/*.xml 2>/dev/null)
+testmkd /mnt/etc/opt/kde3/share/config/kdm
[ -r "${themeconf}" ] && usetheme=true
# check if a kdmrc was provided via ConfTGZ
[ -f /rootfs/etc/opt/kde3/share/config/kdm/kdmrc ] || \
@@ -398,11 +399,15 @@ WallpaperMode=NoWallpaper" \
# configure bluetooth services
config_bt () {
-echo -e "# /etc/${D_SYSCONFDIR}/bluetooth - file modified by $0"\
- > /etc/bluetooth
-sed -e "s,START_SERVICES.*,START_SERVICES=\"yes\"," \
- /mnt/etc/${D_SYSCONFDIR}/bluetooth >> /etc/bluetooth
-cp /etc/bluetooth /mnt/etc/${D_SYSCONFDIR}/bluetooth
+if [ -e /mnt/etc/${D_SYSCONFDIR}/bluetooth ] ; then
+ echo -e "# /etc/${D_SYSCONFDIR}/bluetooth - file modified by $0"\
+ > /etc/bluetooth
+ sed -e "s,START_SERVICES.*,START_SERVICES=\"yes\"," \
+ /mnt/etc/${D_SYSCONFDIR}/bluetooth >> /etc/bluetooth
+ cp /etc/bluetooth /mnt/etc/${D_SYSCONFDIR}/bluetooth
+else
+ : # no bluetooth components installed
+fi
}
# set up keytable (function run in hwautocfg)
diff --git a/initramfs/initrd-stuff/bin/hwautocfg b/initramfs/initrd-stuff/bin/hwautocfg
index 75ce2381..9bdb4bc6 100755
--- a/initramfs/initrd-stuff/bin/hwautocfg
+++ b/initramfs/initrd-stuff/bin/hwautocfg
@@ -3,7 +3,7 @@
# universal (distro independent) hardware autoconfiguration script for
# OpenSLX linux diskless clients, using hwconfig from knoppix as base tool
#
-# Dirk von Suchodoletz <dvs@OpenSLX.com>, 20-11-2006
+# Dirk von Suchodoletz <dvs@OpenSLX.com>, 14-12-2006
#
# (c) 2003 - 2006 - RZ Universitaet Freiburg
# (c) 2006 - OpenSLX.org Project
@@ -18,6 +18,7 @@ local VSYNCRANGE="60-90"
local DEFAULTMODES='"1024x768" "800x600" "640x480"'
local DEFAULTCOLORDPT=24
# set variables representing the xorg.conf sections (version 6.9.x)
+# variables might be overwritten via displayvars function
local Module='\tLoad\t\t"dbe"\n
\tLoad\t\t"extmod"\n
\tLoad\t\t"type1"\n
@@ -29,6 +30,7 @@ local ServerFlags='\tOption\t\t"AllowMouseOpenFail"\n
\tOption\t\t"standby time"\t\t"10"\n
\tOption\t\t"suspend time"\t\t"15"\n
\tOption\t\t"off time"\t\t"20"'
+# fixme: Do we really need FontPath, RgbPath!?!
local Files='\tRgbPath\t\t"/usr/X11R6/lib/X11/rgb"\n
\tModulePath\t"/etc/X11/modules"\n
\tModulePath\t"/usr/X11R6/lib/modules"\n
@@ -236,7 +238,8 @@ else
error "$hcfg_xcfg" nonfatal
fi
-# USB core is needed for presence of /proc/bus/usb
+# USB core is needed for presence of /proc/bus/usb (path seems to be deprecated
+# in recent kernels!?)
modprobe ${MODPRV} usbcore &
# "drivers" (pseudo, placeholder strings, ...) to exclude from loading
diff --git a/initramfs/initrd-stuff/bin/servconfig b/initramfs/initrd-stuff/bin/servconfig
index 744c9df9..207adc5b 100755
--- a/initramfs/initrd-stuff/bin/servconfig
+++ b/initramfs/initrd-stuff/bin/servconfig
@@ -4,7 +4,7 @@
# diskless clients (executed in stage3 within initial ramfs). The file-
# system is setup when servconfig starts
#
-# Dirk von Suchodoletz <dvs@OpenSLX.com>, 29-10-2006
+# Dirk von Suchodoletz <dvs@OpenSLX.com>, 14-12-2006
# Michael Janczyk <mj0@uni-freiburg.de>, 10-11-2006
# Lars Mueller <lm@OpenSLX.com>, 23-06-2006
# Oliver Tappe <ot@OpenSLX.com>, 23-06-2006
@@ -412,7 +412,7 @@ chmod 1777 /mnt/tmp
if [ "x$start_x" != "xno" ] ; then
# creating directories commonly needed for X11 in all distros
# rest should be done via config_x11 function (distro specific)
- for i in /var/lib/xkb/ \
+ for i in /var/lib/xkb/compiled \
/etc/X11/xdm \
/etc/X11/sessions \
/var/X11R6/bin \
diff --git a/initramfs/initrd-stuff/etc/functions b/initramfs/initrd-stuff/etc/functions
index e78bf88c..4ede90c6 100644
--- a/initramfs/initrd-stuff/etc/functions
+++ b/initramfs/initrd-stuff/etc/functions
@@ -487,8 +487,8 @@ syslogngcfg=$1
# fixme!? only first logserver from dhcp variable is used
[ -n "$log_servers" ] && start_syslog="syslog://${log_servers% *}:514/udp"
echo -e "# File written by $0 within InitRamFS\n\
-source src {\n\tfile(\"/proc/kmsg\") log_prefix(\"kernel: \");\n\
-\tunix-stream(\"/dev/log\");\n\tinternal();\n};\ndestination console_all {\
+source src {\n\tfile(\"/proc/kmsg\");\n\
+\tunix-dgram(\"/dev/log\");\n\tinternal();\n};\ndestination console_all {\
\n\tfile(\"/dev/tty10\");\n};" >$syslogngcfg
case "$start_syslog" in
yes|Yes|YES)
diff --git a/initramfs/mkdxsinitrd b/initramfs/mkdxsinitrd
index 1e3e1c17..a2992598 100755
--- a/initramfs/mkdxsinitrd
+++ b/initramfs/mkdxsinitrd
@@ -4,7 +4,7 @@
# ramdisks for linux diskless clients (stage2 system
# setup)
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 02-12-2006
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 14-12-2006
# Nico Dietrich
# Felix Endres
# <mj0@uni-freiburg.de> (xenbr), 12-12-2006
@@ -461,11 +461,13 @@ case "${DISTRO}" in
10.0)
DISTRO_VER=10.0
;;
- 10*)
+ 10.1)
DISTRO_VER=10.1
;;
+ 10.2)
+ DISTRO_VER=10.2
+ ;;
esac
-
;;
esac
# at this point ${DISTRO} ${DISTRO_VER} should be fixed
diff --git a/initramfs/slxmkramfs b/initramfs/slxmkramfs
index 0796dd68..108f28b2 100755
--- a/initramfs/slxmkramfs
+++ b/initramfs/slxmkramfs
@@ -374,11 +374,13 @@ case "${DISTRO}" in
10.0)
DISTRO_VER=10.0
;;
- 10*)
+ 10.1)
DISTRO_VER=10.1
;;
+ 10.2)
+ DISTRO_VER=10.2
+ ;;
esac
-
;;
esac
# at this point ${DISTRO} ${DISTRO_VER} should be fixed
diff --git a/installer/distro-specs/exclude-suse-10.1 b/installer/distro-specs/exclude-suse-10.1
index baafa6b1..48852c49 100644
--- a/installer/distro-specs/exclude-suse-10.1
+++ b/installer/distro-specs/exclude-suse-10.1
@@ -19,6 +19,7 @@
- /usr/bin/zen-*
- /usr/lib/zen-updater
- /usr/X11R6/bin/BackGround
+- /var/adm/SuSEconfig
- /var/cache/man/*
- /var/lib/YaST2/you/mnt/*
- /var/lib/hardware/*
@@ -33,6 +34,7 @@
- /var/lib/vm/*
- /var/lib/gdm/*
- /var/lib/dhcp*
+- /var/lib/sax
- /var/lib/xdm
- /var/lib/zmd
- /var/lib/zypp/cache/*
diff --git a/installer/distro-specs/exclude-suse-10.2 b/installer/distro-specs/exclude-suse-10.2
new file mode 120000
index 00000000..a878f43d
--- /dev/null
+++ b/installer/distro-specs/exclude-suse-10.2
@@ -0,0 +1 @@
+exclude-suse-10.1 \ No newline at end of file