summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDirk von Suchodoletz2009-01-17 03:28:38 +0100
committerDirk von Suchodoletz2009-01-17 03:28:38 +0100
commitb4e1ad544a320efcfe83469614516821966a89a3 (patch)
tree6261b8dc51bccfca1c11e09e19bf7f0fb5d0ff2b
parentSome more fixes (missing directories) ... (diff)
downloadcore-b4e1ad544a320efcfe83469614516821966a89a3.tar.gz
core-b4e1ad544a320efcfe83469614516821966a89a3.tar.xz
core-b4e1ad544a320efcfe83469614516821966a89a3.zip
Some more fixes, added missing file.
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2486 95ad53e4-c205-0410-b2fa-d234c58c8868
-rw-r--r--initramfs/distro-specs/scilin/functions-default38
-rw-r--r--initramfs/stage3-stuff/etc/messages6
-rw-r--r--installer/OpenSLX/OSExport/Distro/SciLin.pm94
3 files changed, 122 insertions, 16 deletions
diff --git a/initramfs/distro-specs/scilin/functions-default b/initramfs/distro-specs/scilin/functions-default
index 93e11405..8b3e0fec 100644
--- a/initramfs/distro-specs/scilin/functions-default
+++ b/initramfs/distro-specs/scilin/functions-default
@@ -25,9 +25,9 @@ D_BINDMPTS="tmp root media home"
D_DIRINBINDMNT="/var/run /var/log /var/tmp"
D_RODIRSINRW="/etc/bootsplash /etc/gconf /var/adm /var/lib/texmf /var/lib/rpm \
/var/cache/fontconfig"
-D_DIRINDXS="/var/lib/rpm /var/lib/nobody /var/lib/alternatives/ \
-/var/db/nscd /var/lib/bluetooth /var/lib/scrollkeeper /var/lib/nfs/sm \
-/var/lib/nfs/sm.bak /var/lib/misc /var/spool/cron"
+D_DIRINDXS="/var/lib/rpm /var/lib/nobody /var/lib/alternatives/ /var/db/nscd \
+/var/lib/bluetooth /var/lib/scrollkeeper /var/lib/nfs/sm /var/lib/nfs/sm.bak \
+/var/lib/misc /var/spool/cron"
# empty functions are defined at the beginning of /etc/functions
@@ -41,9 +41,10 @@ config_distro () {
echo -e "SLX VERSION = $SLXVERSION\nINITRAMFS GENERATION DATE = $date" \
>>/mnt/etc/redhat-release
# simple bash configuration for root
- echo ". /etc/bashrc" >/mnt/root/.profile
+ echo -e "# Generated in OpenSLX stage3\n. /etc/bashrc" >/mnt/root/.profile
# enable sysrq
- sed -e "s/kernel.sysrq =.*/kernel.sysrq = 1/" -i /mnt/etc/sysctl.conf
+ sed -e "1i# Configuration modified by $0 during stage3 bootup." \
+ -e "s/kernel.sysrq =.*/kernel.sysrq = 1/" -i /mnt/etc/sysctl.conf
# set some networking stuff if needed
[ -e /mnt/etc/sysconfig/network ] && \
sed -e "s/HOSTNAME=.*/HOSTNAME=$host_name/" \
@@ -53,23 +54,34 @@ config_distro () {
# initial (boot time) runlevel scripts
initial_boot () {
# delete all classical disk base rootfs stuff from rc.sysinit
-sed -e "/# Initialize ha/,/success/d" -e "/^ROOTFSTYPE/,/Remounting root/d" \
+sed -e "6i# Script modified by $0 during stage3 bootup." \
+ -e "/# Initialize ha/,/success/d" -e "/^ROOTFSTYPE/,/Remounting root/d" \
-e "/# Check f/,/Mounting l/d" -e "/^# Configure mach/,/-f \/fastboot/d" \
- -i /mnt/etc/rc.d/rc.sysinit
+ -e "s,/sbin/start_udev$,/etc/init.d/udevd," -i /mnt/etc/rc.d/rc.sysinit
+# write a custom udev script (to be checked!!)
+echo -e "#!/bin/sh\n# Simple udev starter script created as a replacement \
+during OpenSLX stage3\n# bootup." >/mnt/etc/init.d/udevd
+echo -e '. /etc/init.d/functions\nSTRING=$"Starting udev: "
+echo -n "$STRING "\n/sbin/udevstart </dev/null >/dev/null 2>&1
+\n[ $? -eq 0 ] && success $"$STRING" || failure $"$STRING"
+\necho\nexit 0' >>/mnt/etc/init.d/udevd
+chmod u+x /mnt/etc/init.d/udevd
# delete all classical disk base rootfs stuff from halt
-sed -e "/# Save mixer/,/Saving random/d" -e "/quotaoff/,/^# Now halt/d" \
+sed -e "7i# Modified by $0 during stage3 bootup." \
+ -e "/# Save mixer/,/Saving random/d" -e "/quotaoff/,/^# Now halt/d" \
-i /mnt/etc/init.d/halt
# boot.slx is a special runlevel script generated within initialramfs which
-# should be executed before the normal runlevel scripts. Proper shutdown is
-# not needed!?
-echo "/etc/init.d/boot.slx" >>/mnt/etc/rc.d/rc.sysinit
+# should be executed before the normal runlevel scripts.
+echo -e "# Run OpenSLX init runlevel script\n/etc/init.d/boot.slx" \
+ >>/mnt/etc/rc.d/rc.sysinit
# switch off SElinux enforcing
-sed -e "s/SELINUX=.*/SELINUX=permissive/" -i /mnt/etc/selinux/config
+sed -e "1i# Configuration modified by $0 during stage3 bootup." \
+ -e "s/SELINUX=.*/SELINUX=permissive/" -i /mnt/etc/selinux/config
# link halt and reboot scripts
ln -s ../init.d/killall /mnt/etc/rc.d/rc0.d/S00killall
ln -s ../init.d/halt /mnt/etc/rc.d/rc0.d/S01halt
ln -s ../init.d/killall /mnt/etc/rc.d/rc6.d/S00killall
-ln -s ../init.d/halt /mnt/etc/rc.d/rc0.d/S01reboot
+ln -s ../init.d/halt /mnt/etc/rc.d/rc6.d/S01reboot
}
# linking runlevel scripts
diff --git a/initramfs/stage3-stuff/etc/messages b/initramfs/stage3-stuff/etc/messages
index 7f6ed647..5ad40756 100644
--- a/initramfs/stage3-stuff/etc/messages
+++ b/initramfs/stage3-stuff/etc/messages
@@ -31,8 +31,8 @@ init_errldap=" Unable to setup at \
least basic functionality, because no IP configuration\n available. Please \
beware - ldap works only in combination of either\n ipappend or similar or \
with dhcp!"
-init_errnwad=" Failed to load the network \
-adaptor modules defined via mkdxsinitrd\n run. Please rerun and list the \
+init_errnwad=" Failed to load the network adaptor modules added via \
+slxconfig-demuxer\n run. Please reconfigure the module list and add the \
appropriate modules (without .ko)."
init_bootmac=" If you have more than one ethernet adaptor present in your \
machine or using\n a NVidia chipset then it would be advisable to switch on \
@@ -57,7 +57,7 @@ init_dnbd2s=" After 100 retries, it was not possible to start the dnbd2 \
service. Please\n check that at least one server is available. You might \
use the\n /sys/block/vnbd0 interface for this."
init_moddir=" The requested modules directory does not exist. That could \
-mean:\n * The kernel was updated but mkdxsinitrd was not run afterwards.\n\
+mean:\n * The kernel was updated but the demuxer was not run afterwards.\n\
* The mounted filesystem does not contain the modules directory at all.\n\
You might want to check the list of mounted filesystems and if /mnt is\n\
not empty run 'ls /mnt/lib/modules' to check."
diff --git a/installer/OpenSLX/OSExport/Distro/SciLin.pm b/installer/OpenSLX/OSExport/Distro/SciLin.pm
new file mode 100644
index 00000000..272b5cef
--- /dev/null
+++ b/installer/OpenSLX/OSExport/Distro/SciLin.pm
@@ -0,0 +1,94 @@
+# Copyright (c) 2006, 2007 - OpenSLX GmbH
+#
+# This program 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 suggestions, praise, or complaints to feedback@openslx.org
+#
+# General information about OpenSLX can be found at http://openslx.org/
+# -----------------------------------------------------------------------------
+# OSExport/Distro/SciLin.pm
+# - provides SciLin-specific overrides of the OSExport Distro API.
+# -----------------------------------------------------------------------------
+package OpenSLX::OSExport::Distro::SciLin;
+
+use strict;
+use warnings;
+
+use base qw(OpenSLX::OSExport::Distro::Base);
+
+use OpenSLX::Basics;
+
+################################################################################
+### implementation
+################################################################################
+sub new
+{
+ my $class = shift;
+ my $self = {
+ 'base-name' => 'scilin',
+ };
+ return bless $self, $class;
+}
+
+sub initDistroInfo
+{
+ my $self = shift;
+
+ $self->{'export-filter'} = "
+ - /var/tmp/*
+ - /var/spool/*
+ - /var/run/*
+ - /var/mail
+ - /var/log/*
+ - /var/lock/*
+ - /var/lib/xdm
+ - /var/lib/vm*
+ - /var/lib/suspend*
+ - /var/lib/smart
+ - /var/lib/gdm/*
+ - /var/lib/dhcp*
+ - /var/lib/bluetooth/
+ - /var/cache/yum
+ - /var/cache/man/*
+ - /var/cache/zypp/*
+ + /usr/lib/python*/*/*.o
+ + /usr/lib/perl5/*/*/*/*.o
+ + /usr/lib/gcc/*/*/*.o
+ + /usr/lib/*.o
+ + /usr/X11R6/lib/modules/drivers/*.o
+ + /usr/X11R6/lib/modules/drivers/linux/*.o
+ - /usr/bin/BackGround
+ - /tmp/*
+ - /sys/*
+ - /proc/*
+ - /opt/kde3/share/apps/kdm/read_sysconfig.sh
+ - /opt/kde3/share/autostart/runupdater.desktop
+ - /opt/kde3/share/autostart/profile_chooser-autostart.desktop
+ - /opt/kde3/share/autostart/kinternet.desktop
+ - /usr/share/gnome/autostart/gpk-update-icon*.desktop
+ - /mnt/*
+ - /media/*
+ + /media
+ + /lib/modules/*/misc/vmblock.o
+ + /lib/modules/*/misc/vmnet.o
+ + /lib/modules/*/misc/vmmon.o
+ - /etc/*rpmnew
+ - /etc/*rpmorig
+ - /etc/*pptp*
+ - /etc/*ppp*
+ - /etc/dhcp*
+ - /etc/cron.*/*
+ - /etc/netplug*
+ - /etc/sysconfig/network*
+ - /etc/X11/xkb
+ - /boot/initrd*
+ - /boot/grub
+ - *.rpmsave
+ - *.rpmnew
+ ";
+ return;
+}
+
+1;