diff options
author | Dirk von Suchodoletz | 2006-10-29 22:24:54 +0100 |
---|---|---|
committer | Dirk von Suchodoletz | 2006-10-29 22:24:54 +0100 |
commit | dc285a867bcc05d0c5c88a3c9eb13b84d71c8e62 (patch) | |
tree | c96728db00a14a894b130590d355399527be184a /initramfs | |
parent | * fixed linebreak problem, now we use '\x0a' only, in order (diff) | |
download | core-dc285a867bcc05d0c5c88a3c9eb13b84d71c8e62.tar.gz core-dc285a867bcc05d0c5c88a3c9eb13b84d71c8e62.tar.xz core-dc285a867bcc05d0c5c88a3c9eb13b84d71c8e62.zip |
First changes for syslog (URI format possible in variable syslog, see
''machine-setup''), fallback in init if no kernel-version is passed ...
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@497 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs')
-rw-r--r-- | initramfs/distro-specs/suse/functions-default | 10 | ||||
-rwxr-xr-x | initramfs/initrd-stuff/init | 6 |
2 files changed, 11 insertions, 5 deletions
diff --git a/initramfs/distro-specs/suse/functions-default b/initramfs/distro-specs/suse/functions-default index 1882218b..c9301e75 100644 --- a/initramfs/distro-specs/suse/functions-default +++ b/initramfs/distro-specs/suse/functions-default @@ -3,10 +3,10 @@ # inclusion of the main functions file). This file is the main base for the # several SuSE distro versions # -# Dirk von Suchodoletz <dvs@OpenSLX.com>, 07-10-2006 +# Dirk von Suchodoletz <dvs@OpenSLX.com>, 29-10-2006 # # (c) 2006 - RZ Universitaet Freiburg -# (c) 2006 OpenSLX.org Project +# (c) 2006 OpenSLX.ORG Project # empty functions are defined at the beginning of /etc/functions @@ -92,13 +92,13 @@ if [ "x$start_cron" = "xyes" ] ; then fi } -# syslog service +# syslog service (different syslogs might be present) config_syslog () { -if [ "x$start_syslog" = "xyes" ] ; then +if [ "x$start_syslog" != "xno" ] ; then if [ -f /mnt/etc/${D_INITDIR}/syslog ] ; then # how to configure remote log server? # logging servers might be specified in $log_servers (from e.g. dhcp) - echo -e "# File modified by $0 within initial ramdisk" \ + echo -e "# File modified by $0 within InitRamFS" \ > /etc/syslog-ng.conf sed -e "s,.*dhcp/dev.*,,;s,.*named/dev.*,," \ /mnt/etc/syslog-ng/syslog-ng.conf >> /etc/syslog-ng.conf diff --git a/initramfs/initrd-stuff/init b/initramfs/initrd-stuff/init index dc61fa25..7b20d904 100755 --- a/initramfs/initrd-stuff/init +++ b/initramfs/initrd-stuff/init @@ -47,6 +47,12 @@ mkdir -p ${DEVDIR}/.udevdb # redirect console (after /dev/console is available, and /dev mounted) exec < /dev/console > /dev/console 2>&1 +# if no kernel version is set, try to get it directly from /proc +if [ -z $KERNEL ] ; then + KERNEL=$(cat /proc/version) + KERNEL=${KERNEL#*version } + KERNEL=${KERNEL% (*) (*} +fi # set defaults for some important variables, might be overwritten via # kernel commandline TMPFSSIZE="50%" |