# HG changeset patch # User Christophe Lincoln # Date 1338580852 -7200 # Node ID 445b09ea0b07364af7ba52afa94bfb42082309cd # Parent 175315b7699d0390b73e9890a26ec2b50bc2da24 rcS: /dev/cdrom is created by udev and add bin/rcSconf for rcS.conf migration diff -r 175315b7699d -r 445b09ea0b07 bin/rcSconf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bin/rcSconf Fri Jun 01 22:00:52 2012 +0200 @@ -0,0 +1,62 @@ +#!/bin/sh +# +# Update and clean-up /etc/rcS.conf +# + +# X is now started earlier by system.sh +up_daemons() { + echo $RUN_DAEMONS | sed \ + -e s/dbus// -e s/hald// -e s/slim// -e s'/ //' -e s'/ //' +} + +case "$1" in + up) + [ $(id -u) != 0 ] && exit 0 + #check_root: broken gettext in libtaz.sh + . /etc/rcS.conf + cp -f /etc/rcS.conf /etc/slitaz/rcS.conf.bak + echo "Updating: /etc/rcS.conf" + cat > /etc/rcS.conf << EOT +# /etc/rcS.conf : Initial boot script configuration for SliTaz GNU/Linux +# Sourced by : /etc/init.d/rcS +# + +# Use udev to populate /dev and handle hotplug events +UDEV="$UDEV" + +# Clean up the system removing all tmp and pid files +CLEAN_UP_SYSTEM="$CLEAN_UP_SYSTEM" + +# Filesystems to check integrity of at boot time. You should check the +# rootfs (where SliTaz is installed) and all partitions listed in fstab. +# Example: CHECK_FS="/dev/hda5 /dev/hdb1" +CHECK_FS="$CHECK_FS" + +# Syslogd: Max size (KB) before rotation +SYSLOGD_ROTATED_SIZE="$SYSLOGD_ROTATED_SIZE" + +# Kernel modules to load at boot time +LOAD_MODULES="$LOAD_MODULES" + +# X Login manager: slim or lxdm, empty to disable X +LOGIN_MANAGER="slim" + +# Initialization scripts to run at boot time. The local.sh script +# let you quickly add some local startup commands. +RUN_SCRIPTS="bootopts.sh system.sh network.sh local.sh" + +# Daemons to start at boot time. DBUS daemon is started before the +# login manager and from: /etc/init.d/system.sh +RUN_DAEMONS="$(up_daemons)" + +# Pre login message +MESSAGE="Welcome to your box" +EOT + diff /etc/slitaz/rcS.conf.bak /etc/rcS.conf > \ + /etc/slitaz/rcS.conf.diff ;; + show) less -E /etc/rcS.conf ;; + show-diff) less -E /etc/slitaz/rcS.conf.diff ;; + clean) rm -f /etc/slitaz/rcS.conf* ;; + *) echo "Usage: $(basename $0) [up|show|show-diff|clean]" ;; +esac +exit 0 diff -r 175315b7699d -r 445b09ea0b07 etc/init.d/rcS --- a/etc/init.d/rcS Fri Jun 01 21:46:07 2012 +0200 +++ b/etc/init.d/rcS Fri Jun 01 22:00:52 2012 +0200 @@ -106,20 +106,6 @@ echo "System clean up is disabled in: /etc/rcS.conf" fi -# Create /dev/cdrom if needed (symlink does not exist on LiveCD). -# Also add /dev/cdrom to fstab if entry does not exist. -if [ "$CDROM" ]; then - DRIVE_NAME=${CDROM#/dev/} -else - DRIVE_NAME=$(fgrep -s "drive name" /proc/sys/dev/cdrom/info | cut -f 3) -fi -if [ "$DRIVE_NAME" -a ! "$(readlink /dev/cdrom)" ]; then - echo -n "Creating symlink : /dev/cdrom..." - ln -s /dev/$DRIVE_NAME /dev/cdrom - ln -s /dev/$DRIVE_NAME /dev/dvd - status -fi - # Handle kernel cmdline parameter modprobe= if [ "$MODPROBE" ]; then MODULES=$(sed -e 's/.* modprobe=\([^ ]*\).*/\1/' -e 's/,/\n/g' < /proc/cmdline)