# HG changeset patch # User Christophe Lincoln # Date 1338579967 -7200 # Node ID 175315b7699d0390b73e9890a26ec2b50bc2da24 # Parent 8c7926208f7cecedb7c902401429dae0e172ba21 Huge clean, colored rcS, faster, fix sound and other devices (used need a devtmpfs mounted on /dev) disabled logging for now diff -r 8c7926208f7c -r 175315b7699d applications/bootlog.desktop --- a/applications/bootlog.desktop Wed May 02 17:03:41 2012 +0200 +++ b/applications/bootlog.desktop Fri Jun 01 21:46:07 2012 +0200 @@ -1,8 +1,8 @@ [Desktop Entry] Encoding=UTF-8 -Name=Show Boot Log +Name=Boot Log Viewer Name[fr]=Log de démarrage -Exec=xterm -hold -title 'boot.log (shift-pgup/pgdn to scroll)' -e 'bootlog' -Icon=other.png +Exec=bootlog box +Icon=text-plain Type=Application Categories=System; diff -r 8c7926208f7c -r 175315b7699d bin/bootlog --- a/bin/bootlog Wed May 02 17:03:41 2012 +0200 +++ b/bin/bootlog Fri Jun 01 21:46:07 2012 +0200 @@ -1,4 +1,16 @@ #!/bin/sh -# tazbootlog: Display SliTaz boot log messages. # -cat /var/log/dmesg.log /var/log/boot.log | sed "s/.\[3g.*\]R//" +# Display SliTaz boot log messages +# + +catlog() { + cat /var/log/dmesg.log /var/log/boot.log | sed "s/.\[3g.*\]R//" +} + +case "$1" in + box) catlog | sed -e s'///'g -e s'/\[1;3[0-9]m//'g \ + -e s'/\[*.0G\[/ /'g -e s'/\[0;39m.*//'g | yad \ + --text-info --title="Boot Log" --window-icon=text-plain \ + --width=600 --height=400 --button=gtk-close:0 ;; + *) catlog ;; +esac diff -r 8c7926208f7c -r 175315b7699d etc/init.d/bootopts.sh --- a/etc/init.d/bootopts.sh Wed May 02 17:03:41 2012 +0200 +++ b/etc/init.d/bootopts.sh Fri Jun 01 21:46:07 2012 +0200 @@ -1,21 +1,13 @@ #!/bin/sh -# /etc/init.d/bootopts.sh - SliTaz boot options from the cmdline. +# +# /etc/init.d/bootopts.sh : SliTaz boot options from the cmdline # # Earlier boot options are in rcS, ex: config= and modprobe= # . /etc/init.d/rc.functions -# Update fstab for swapon/swapoff -add_swap_in_fstab() -{ - grep -q "$1 " /etc/fstab || cat >> /etc/fstab < /proc/sys/vm/laptop_mode ;; mount) @@ -199,15 +185,3 @@ if [ ! -f /etc/X11/wm.default ]; then echo "openbox" > /etc/X11/wm.default fi - -# Activate an eventual swap file or partition. -if [ "`fdisk -l | grep swap`" ]; then - for SWAP_DEV in `fdisk -l | sed '/swap/!d;s/ .*//'`; do - echo "Swap memory detected on: $SWAP_DEV" - add_swap_in_fstab $SWAP_DEV - done -fi -if grep -q swap /etc/fstab; then - echo "Activating swap memory..." - swapon -a -fi diff -r 8c7926208f7c -r 175315b7699d etc/init.d/local.sh --- a/etc/init.d/local.sh Wed May 02 17:03:41 2012 +0200 +++ b/etc/init.d/local.sh Fri Jun 01 21:46:07 2012 +0200 @@ -1,9 +1,6 @@ #!/bin/sh -# /etc/init.d/local.sh - Local startup commands. +# +# /etc/init.d/local.sh: Local startup commands # # All commands here will be executed at boot time. # -. /etc/init.d/rc.functions - -echo "Starting local startup commands... " - diff -r 8c7926208f7c -r 175315b7699d etc/init.d/network.sh --- a/etc/init.d/network.sh Wed May 02 17:03:41 2012 +0200 +++ b/etc/init.d/network.sh Fri Jun 01 21:46:07 2012 +0200 @@ -1,6 +1,7 @@ #!/bin/sh -# /etc/init.d/network.sh - Network initialization boot script. -# Config file is: /etc/network.conf +# +# /etc/init.d/network.sh : Network initialization boot script +# Configuration file : /etc/network.conf # . /etc/init.d/rc.functions @@ -12,7 +13,7 @@ boot() { # Set hostname. - echo -n "Setting hostname..." + echo -n "Setting hostname to: $(cat /etc/hostname)" /bin/hostname -F /etc/hostname status @@ -30,7 +31,7 @@ # For wifi. Users just have to enable it through yes and usually # essid any will work and the interface is autodetected. -wifi() { +wifi() { if [ "$WIFI" = "yes" ] || fgrep -q "wifi" /proc/cmdline; then ifconfig $INTERFACE down @@ -52,7 +53,7 @@ iwconfig $WIFI_INTERFACE txpower on fi status - + [ -n "$WPA_DRIVER" ] || WPA_DRIVER="wext" IWCONFIG_ARGS="" [ -n "$WIFI_MODE" ] && IWCONFIG_ARGS="$IWCONFIG_ARGS mode $WIFI_MODE" diff -r 8c7926208f7c -r 175315b7699d etc/init.d/rc.shutdown --- a/etc/init.d/rc.shutdown Wed May 02 17:03:41 2012 +0200 +++ b/etc/init.d/rc.shutdown Fri Jun 01 21:46:07 2012 +0200 @@ -1,19 +1,19 @@ #!/bin/sh -# /etc/init.d/rc.shutdown - This script is used by /etc/inittab to stop -# all daemons and shutdown the system. +# +# /etc/init.d/rc.shutdown : Executed on system shutdown or reboot # . /etc/init.d/rc.functions . /etc/rcS.conf log=/var/lib/shutdown.log -# Bold info message with uptime +# Clear and quiet shutdown clear && echo "System is going down for reboot or halt." > $log uptime >> $log # Store last alsa settings. if [ -x /usr/sbin/alsactl ]; then - alsactl store + alsactl store 2>> $log fi # Stop all daemons started at boot time. diff -r 8c7926208f7c -r 175315b7699d etc/init.d/rcS --- a/etc/init.d/rcS Wed May 02 17:03:41 2012 +0200 +++ b/etc/init.d/rcS Fri Jun 01 21:46:07 2012 +0200 @@ -1,6 +1,7 @@ #!/bin/sh -# /etc/init.d/rcS - Initial boot script for SliTaz GNU/Linux. -# Config file is : /etc/rcS.conf +# +# /etc/init.d/rcS : Initial boot script for SliTaz GNU/Linux +# Configuration file : /etc/rcS.conf # # rcS is the main initialization script used to check fs, mount, clean, # run scripts and start daemons. @@ -8,84 +9,79 @@ . /etc/init.d/rc.functions . /etc/rcS.conf -# Set TZ and boot time. +# Set PATH, TZ and boot time. +export PATH=/bin:/sbin:/usr/bin:/usr/sbin [ -s /etc/TZ ] && export TZ="$(cat /etc/TZ)" -[ -n "$bootdate" ] || bootdate=`date +%s` +[ -n "$bootdate" ] || bootdate=$(date +%s) case "$1" in readonly) -# Graphical boot start. -if [ "$FBSPLASH" == "yes" ]; then - reset && fbsplash -c \ - -s /etc/fbsplash/$FBSPLASH_THEME/fbsplash.ppm \ - -i /etc/fbsplash/$FBSPLASH_THEME/fbsplash.cfg \ - -f /etc/fbsplash/fifo & - echo "0" > /etc/fbsplash/fifo && sleep 1 -fi - -echo "Processing /etc/init.d/rcS..." +colorize 34 "Processing /etc/init.d/rcS..." # Mount /proc. echo -n "Mounting proc filesystem..." -/bin/mount proc +mount proc && status + +# Mount /run as tmpfs to avoid pidfile and other runtime data behing +# writting to disk. +echo -n "Mounting tmpfs filesystem on: /run" +mount -t tmpfs tmpfs /run status -[ "$FBSPLASH" == "yes" ] && echo "10" > /etc/fbsplash/fifo - -[ "$FBSPLASH" == "yes" ] && echo "20" > /etc/fbsplash/fifo - # Before mounting filesystems we check fs specified in the file # /etc/rcS.conf and variable $CHECK_FS. -if [ -n "$CHECK_FS" ]; then +if [ "$CHECK_FS" ]; then mount -o remount,ro / - for i in $CHECK_FS - do - echo "Checking filesystem on : $i" - /sbin/e2fsck -p $i + for i in $CHECK_FS; do + colorize 36 "Checking filesystem: $i" + e2fsck -p $i done fi # Remount rootfs rw. echo "Remounting rootfs read/write..." -/bin/mount -o remount,rw / +mount -o remount,rw / ;; readwrite) # Trigger Udev and handle hotplug events if [ "$UDEV" = "yes" ]; then + echo -n "Mounting devtmpfs filesystem..." + mount -t devtmpfs devtmpfs /dev + status echo "Starting udev daemon..." - /sbin/udevd --daemon + mkdir -p /run/udev + udevd --daemon 2>/dev/null echo "Udevadm requesting events from the Kernel..." udevadm trigger echo "Udevadm waiting for the event queue to finish..." - udevadm settle - echo "Using Udev for hotplugging..." - echo "/sbin/udevd" > /proc/sys/kernel/hotplug + udevadm settle --timeout=120 + # Disable hotplug helper since udevd listen to netlink + echo "" > /proc/sys/kernel/hotplug fi -[ "$FBSPLASH" == "yes" ] && echo "30" > /etc/fbsplash/fifo - # Mount filesystems in /etc/fstab. echo "Mounting filesystems in fstab..." -/bin/mount -a +mount -a + +# Be quiet +echo "0 0 0 0" > /proc/sys/kernel/printk ;; logged) # Store boot messages to log files. -/bin/dmesg > /var/log/dmesg.log & +dmesg > /var/log/dmesg.log & # Parse cmdline args for earlier boot options. All other boot options # are in /etc/init./bootopts.sh. echo -n "Searching for early boot options..." -for opt in `cat /proc/cmdline` +for opt in $(cat /proc/cmdline) do case $opt in - fastbootx|fbx) - export FAST_BOOT_X="yes" ;; cdrom=*) export CDROM=${opt#cdrom=} ;; modprobe=*) @@ -98,75 +94,38 @@ done status -# Clean up the system. +# Clean up the system and set up tmp X11 and ICE dir if [ "$CLEAN_UP_SYSTEM" = "yes" ]; then echo -n "Cleaning up the system..." find /var/run -name "*.pid" -type f | xargs /bin/rm -f - /bin/rm -rf /tmp /var/run/dbus/* /var/run/hald/pid /var/lock/* - /bin/mkdir -p /tmp && /bin/chmod 1777 /tmp + rm -rf /tmp /var/run/dbus/* /var/run/hald/pid /var/lock/* + mkdir -p /tmp/.X11-unix /tmp/.ICE-unix + chmod -R 1777 /tmp status else - echo "System clean up is disabled in /etc/rcS.conf..." - echo -n "Keeping all tmp and pid files..." - status -fi - -[ "$FBSPLASH" == "yes" ] && echo "40" > /etc/fbsplash/fifo - -# Set up tmp X11 and ICE dir. -echo -n "Setting up tmp X11 and ICE unix dir..." -/bin/mkdir -p /tmp/.X11-unix /tmp/.ICE-unix -/bin/chmod 1777 /tmp/.X11-unix /tmp/.ICE-unix -status - -# Fast boot into X for HD install or custom Live system. We need -# keymap settings since Xvesa dumps the console mapping and a correct -# slim configuration for screen resolution. DBUS and HAL must also start -# before X session (manual login or autologin) to have devices in PCmanFM. -if [ "$FAST_BOOT_X" = "yes" ]; then - /etc/init.d/system.sh - /etc/init.d/dbus start - /etc/init.d/hald start - /etc/init.d/slim start & + 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 [ -n "$CDROM" ]; then +if [ "$CDROM" ]; then DRIVE_NAME=${CDROM#/dev/} else DRIVE_NAME=$(fgrep -s "drive name" /proc/sys/dev/cdrom/info | cut -f 3) fi -if [ -n "$DRIVE_NAME" -a ! "`readlink /dev/cdrom`" ]; then +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 -if ! fgrep -q "/dev/cdrom" /etc/fstab; then - echo -n "Adding /dev/cdrom to fstab..." - echo '/dev/cdrom /media/cdrom iso9660 user,ro,noauto 0 0' \ - >> /etc/fstab - status -fi -# Chmod hack on each boot for Asunder and burnbox. Allowing all users -# to burn/rip CD/DVD. -if [ -n "$DRIVE_NAME" -a "`readlink /dev/cdrom`" ]; then - echo -n "Chmoding cdrom device..." - chmod 0666 /dev/cdrom - chmod 0666 /dev/dvd - chmod 0666 /dev/$DRIVE_NAME - status -fi - -[ "$FBSPLASH" == "yes" ] && echo "50" > /etc/fbsplash/fifo # Handle kernel cmdline parameter modprobe= -if [ -n "$MODPROBE" ]; then - MODULES=`sed -e 's/.* modprobe=\([^ ]*\).*/\1/' -e 's/,/\n/g' < /proc/cmdline` +if [ "$MODPROBE" ]; then + MODULES=$(sed -e 's/.* modprobe=\([^ ]*\).*/\1/' -e 's/,/\n/g' < /proc/cmdline) for i in $MODULES; do - echo -n "Loading kernel module $i" - /sbin/modprobe $i + echo -n "Loading kernel module: $i" + modprobe $i status done fi @@ -177,131 +136,107 @@ DEVICE=${CONFIG%,*} SCRIPT=${CONFIG#*,} echo "Probing $DEVICE... " - if ! /bin/mount -r $DEVICE /mnt; then + if ! mount -r $DEVICE /mnt; then if echo $DEVICE | grep -Eq "/dev/sd|UUID=|LABEL="; then - USBDELAY=`cat /sys/module/usb_storage/parameters/delay_use` + USBDELAY=$(cat /sys/module/usb_storage/parameters/delay_use) USBDELAY=$((1+$USBDELAY)) echo "$DEVICE is potentially a USB device: sleep for $USBDELAY seconds" sleep $USBDELAY fi - if ! /bin/mount -r $DEVICE /mnt; then + if ! mount -r $DEVICE /mnt; then CONFIG="" fi fi echo -n "Source $SCRIPT from $DEVICE..." if [ -n "$CONFIG" ]; then . /mnt/$SCRIPT - /bin/umount /mnt 2> /dev/null || true + umount /mnt 2> /dev/null || true fi status fi -# Mount /proc/bus/usb. +# Mount /proc/bus/usb if [ -d /proc/bus/usb ]; then echo -n "Mounting /proc/bus/usb filesystem..." - /bin/mount -t usbfs usbfs /proc/bus/usb + mount -t usbfs usbfs /proc/bus/usb status fi -[ "$FBSPLASH" == "yes" ] && echo "60" > /etc/fbsplash/fifo +# Start syslogd and klogd +echo -n "Starting system log deamon: syslogd..." +syslogd -s $SYSLOGD_ROTATED_SIZE && status +echo -n "Starting kernel log daemon: klogd..." +klogd && status -# Start syslogd and klogd. -if [ "$KERNEL_LOG_DAEMONS" = "yes" ]; then - echo -n "Starting system log deamon: syslogd..." - /sbin/syslogd -s $SYSLOGD_ROTATED_SIZE && status - echo -n "Starting kernel log daemon: klogd..." - /sbin/klogd && status -else - echo "Kernel log daemons are disabled in /etc/rc.conf..." -fi - -# Load all modules listed in config file. -if [ -n "$LOAD_MODULES" ]; then - for mod in $LOAD_MODULES - do +# Load all modules listed in config file +if [ "$LOAD_MODULES" ]; then + colorize 33 "Loading Kernel modules..." + for mod in $LOAD_MODULES; do + echo -n "Loading module: $mod" modprobe $mod + status done fi -# Be quiet on configuration to avoid messages overwriting ncurses dialog -echo "0 0 0 0" > /proc/sys/kernel/printk - -[ "$FBSPLASH" == "yes" ] && echo "70" > /etc/fbsplash/fifo - # Detect PCI and USB devices with Tazhw from slitaz-tools. We load # kernel modules only at first boot or in LiveCD mode. if [ ! -s /var/lib/detected-modules ]; then - /sbin/tazhw init + tazhw init fi -[ "$FBSPLASH" == "yes" ] && echo "80" > /etc/fbsplash/fifo - -# Call udevadm trigger to ensure /dev is fully populate now that all +# Call udevadm trigger to ensure /dev is fully populate now that all # modules are loaded. if [ "$UDEV" = "yes" ]; then - echo -n "Requesting events from the Kernel..." - udevadm trigger + echo -n "Triggering udev events: --action=add" + udevadm trigger --action=add status fi -# Start all scripts specified with $RUN_SCRIPTS. -echo "Executing all initialization scripts..." -for script in $RUN_SCRIPTS -do - if [ -x /etc/init.d/$script ]; then - /etc/init.d/$script - fi +# Start all scripts specified with $RUN_SCRIPTS +for script in $RUN_SCRIPTS; do + echo $(colorize 34 "Processing: /etc/init.d/$script") + /etc/init.d/$script done -[ "$FBSPLASH" == "yes" ] && echo "90" > /etc/fbsplash/fifo - -# Re-source main config file. In Live mode, daemons list can be modified -# by boot options (screen=text will remove slim). -. /etc/rcS.conf - -# Start all daemons specified with $RUN_DAEMONS. -echo "Starting all daemons specified in /etc/rcS.conf..." -for daemon in $RUN_DAEMONS -do - if [ -x /etc/init.d/$daemon ]; then +# Start all daemons specified with $RUN_DAEMONS +if [ "$RUN_DAEMONS" ]; then + colorize 33 "Starting all daemons..." + for daemon in $RUN_DAEMONS; do /etc/init.d/$daemon start - fi -done - -[ "$FBSPLASH" == "yes" ] && echo "100" > /etc/fbsplash/fifo - -# Back to a verbose mode. -echo "7 4 1 7" > /proc/sys/kernel/printk - -# Reset screen and display a bold message. -if [ -n "$MESSAGE" ]; then - /usr/bin/reset - echo -e "\033[1m$MESSAGE\033[0m" + done fi -# Display and log boot time. +# Back to a verbose mode +(sleep 6 && echo "7 4 1 7" > /proc/sys/kernel/printk) & + +if [ "$MESSAGE" ]; then + newline + colorize 32 "$MESSAGE" +fi + +# Display and log boot time time=$((`date +%s` - $bootdate)) echo $time > /var/log/boot-time echo "SliTaz boot time: ${time}s" -[ "$FBSPLASH" == "yes" ] && echo "exit" > /etc/fbsplash/fifo ;; *) -if [ ! -s /dev/shm/boot.log ]; then - mount -t devpts devpts /dev/pts - mount -t tmpfs tmpfs /dev/shm -fi -script -aqc '/etc/init.d/rcS readonly' /dev/shm/boot.log -mv -f /dev/shm/boot.log /boot.log -umount /dev/shm -script -aqc '/etc/init.d/rcS readwrite' /boot.log -last=.9 -for i in .8 .7 .6 .5 .4 .3 .2 .1 .0 '' ; do - mv -f /var/log/boot.log$i /var/log/boot.log$last 2>/dev/null - last=$i -done -mv -f /boot.log /var/log/boot.log -script -aqc '/etc/init.d/rcS logged' /var/log/boot.log -;; - + # --> readonly --> readwrite --> logged. + #if [ ! -s /run/boot.log ]; then + #mount -t devpts devpts /dev/pts + #mount -t tmpfs tmpfs /run + #fi + #script -aqc '/etc/init.d/rcS readonly' /run/boot.log + #script -aqc '/etc/init.d/rcS readwrite' /run/boot.log + /etc/init.d/rcS readonly + /etc/init.d/rcS readwrite + # Lograde boot.log + #last=.9 + #for i in .8 .7 .6 .5 .4 .3 .2 .1 .0 '' ; do + #mv -f /var/log/boot.log$i /var/log/boot.log$last 2>/dev/null + #last=$i + #done + #mv -f /run/boot.log /var/log/boot.log + #script -aqc '/etc/init.d/rcS logged' /var/log/boot.log + /etc/init.d/rcS logged ;; esac diff -r 8c7926208f7c -r 175315b7699d etc/init.d/system.sh --- a/etc/init.d/system.sh Wed May 02 17:03:41 2012 +0200 +++ b/etc/init.d/system.sh Fri Jun 01 21:46:07 2012 +0200 @@ -1,11 +1,13 @@ #!/bin/sh -# /etc/init.d/system.sh - SliTaz hardware configuration. +# +# /etc/init.d/system.sh : SliTaz hardware configuration # # This script configures the sound card and screen. Tazhw is used earlier # at boot time to autoconfigure PCI and USB devices. It also configures -# system language, keyboard and TZ in live mode. +# system language, keyboard and TZ in live mode and start X. # . /etc/init.d/rc.functions +. /etc/rcS.conf # Parse cmdline args for boot options (See also rcS and bootopts.sh). XARG="" @@ -19,14 +21,6 @@ DRIVER=${opt#sound=} ;; xarg=*) XARG="$XARG ${opt#xarg=}" ;; - screen=text) - SCREEN=text - # Disable X. - echo -n "Disabling X login manager: slim..." - . /etc/rcS.conf - RUN_DAEMONS=$(echo $RUN_DAEMONS | sed s/' slim'/''/) - sed -i s/"RUN_DAEMONS.*"/"RUN_DAEMONS=\"$RUN_DAEMONS\"/" /etc/rcS.conf - status ;; screen=*) SCREEN=${opt#screen=} ;; *) @@ -38,26 +32,26 @@ # sound Kernel modules. if [ -n "$DRIVER" ]; then case "$DRIVER" in - no) - echo -n "Removing all sound kernel modules..." - rm -rf /lib/modules/`uname -r`/kernel/sound - status - echo -n "Removing all sound packages..." - for i in $(grep -l '^DEPENDS=.*alsa-lib' /var/lib/tazpkg/installed/*/receipt) ; do - pkg=${i#/var/lib/tazpkg/installed/} - echo 'y' | tazpkg remove ${pkg%/*} > /dev/null - done - for i in alsa-lib mhwaveedit asunder libcddb ; do - echo 'y' | tazpkg remove $i > /dev/null - done - status ;; - noconf) - echo "Sound configuration was disabled from cmdline..." ;; - *) - if [ -x /usr/sbin/soundconf ]; then - echo "Using sound kernel module $DRIVER..." - /usr/sbin/soundconf -M $DRIVER - fi ;; + no) + echo -n "Removing all sound kernel modules..." + rm -rf /lib/modules/$(uname -r)/kernel/sound + status + echo -n "Removing all sound packages..." + for i in $(grep -l '^DEPENDS=.*alsa-lib' /var/lib/tazpkg/installed/*/receipt) ; do + pkg=${i#/var/lib/tazpkg/installed/} + echo 'y' | tazpkg remove ${pkg%/*} > /dev/null + done + for i in alsa-lib mhwaveedit asunder libcddb ; do + echo 'y' | tazpkg remove $i > /dev/null + done + status ;; + noconf) + echo "Sound configuration was disabled from cmdline..." ;; + *) + if [ -x /usr/sbin/soundconf ]; then + echo "Using sound kernel module $DRIVER..." + /usr/sbin/soundconf -M $DRIVER + fi ;; esac # Sound card may already be detected by PCI-detect. elif [ -d /proc/asound ]; then @@ -76,12 +70,6 @@ echo "Unable to configure sound card." fi -# Start TazPanel -[ -x /usr/bin/tazpanel ] && tazpanel start - -# Auto recharge packages list (after network connection of course) -[ "$RECHARGE_PACKAGES_LIST" == "yes" ] && tazpkg recharge & - # Locale config. echo "Checking if /etc/locale.conf exists... " if [ ! -s "/etc/locale.conf" ]; then @@ -109,37 +97,42 @@ echo "Europe/Paris" > /etc/TZ ;; fr_CH-latin1|de_CH-latin1) echo "Europe/Zurich" > /etc/TZ ;; - cf) - echo "America/Montreal" > /etc/TZ ;; - *) - echo "UTC" > /etc/TZ ;; + cf) echo "America/Montreal" > /etc/TZ ;; + *) echo "UTC" > /etc/TZ ;; esac fi -# Xorg auto configuration. -if [ "$SCREEN" != "text" -a ! -s /etc/X11/xorg.conf -a -x /usr/bin/Xorg ]; then +# Activate an eventual swap file or partition +if [ "$(fdisk -l | grep swap)" ]; then + for swd in $(fdisk -l | sed '/swap/!d;s/ .*//'); do + if ! grep -q "$swd " /etc/fstab; then + echo "Swap memory detected on: $swd" + cat >> /etc/fstab </var/log/xorg.configure.log fi -# Start X sesssion as soon as possible in Live/frugal mode. HD install -# can use FAST_BOOT_X which starts X beforehand. In live mode we need -# keymap config for Xorg configuration and a working Xorg config. -#if [ "$SCREEN" != "text" ] && [ -x /usr/bin/slim ]; then - #if fgrep -q root=/dev/null /proc/cmdline; then - #/etc/init.d/slim start - #fi -#fi +# Start X sesssion as soon as possible +if [ "$SCREEN" != "text" ] && [ "$LOGIN_MANAGER" ]; then + echo -n "Starting X environment..." + /etc/init.d/dbus start >/dev/null + /etc/init.d/$LOGIN_MANAGER start >/dev/null & + status +fi -# Firefox hack to get the right locale. -if fgrep -q "fr_" /etc/locale.conf; then - # But is the fox installed ? - if [ -f "/var/lib/tazpkg/installed/firefox/receipt" ]; then - . /var/lib/tazpkg/installed/firefox/receipt - sed -i 's/en-US/fr/' /etc/firefox/pref/firefox-l10n.js - fi -fi +# Start TazPanel +[ -x /usr/bin/tazpanel ] && tazpanel start diff -r 8c7926208f7c -r 175315b7699d etc/rcS.conf --- a/etc/rcS.conf Wed May 02 17:03:41 2012 +0200 +++ b/etc/rcS.conf Fri Jun 01 21:46:07 2012 +0200 @@ -1,53 +1,34 @@ -# /etc/rcS.conf - Initial boot script configuration for SliTaz GNU/Linux. -# Config file used by /etc/init.d/rcS +# /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. +# Use udev to populate /dev and handle hotplug events UDEV="yes" -# Clean up the system removing all tmp and pid files. +# Clean up the system removing all tmp and pid files CLEAN_UP_SYSTEM="yes" # Filesystems to check integrity of at boot time. You should check the -# rootfs (where SliTaz is installed) and all partitions listed in -# /etc/fstab. Example: CHECK_FS="/dev/hda5 /dev/hdb1" +# rootfs (where SliTaz is installed) and all partitions listed in fstab. +# Example: CHECK_FS="/dev/hda5 /dev/hdb1" CHECK_FS="" -# Fast boot into X by setting the system keymap-locale and starting -# the Slim login manager earlier at boot time. If fast X is enabled -# then dbus, hald and slim can be removed from RUN_DAEMONS. -FAST_BOOT_X="no" - -# Graphical boot with fbsplash (To easily configure use: tazfbsplash) -FBSPLASH="no" -FBSPLASH_THEME="slitaz" - -# Start Kernel log daemons (syslogd and klogd). -KERNEL_LOG_DAEMONS="yes" +# Syslogd: Max size (KB) before rotation SYSLOGD_ROTATED_SIZE="60" -# Kernel modules to automatically load at boot time if not automatically -# detected. You can use 'modprobe -l' to get a list of all kernel modules -# available. +# Kernel modules to load at boot time LOAD_MODULES="" -# Automatically recharge packages list on each boot and in background. -# If new packages or upgrades are available they will be notified with -# tazpkg-notify. Here we just recharge list, we don't install anything -# since root user should visually check packages that will be upgraded. -RECHARGE_PACKAGES_LIST="no" +# X Login manager: slim or lxdm, empty to disable X +LOGIN_MANAGER="slim" -# Initialization scripts to run at boot time. Boot order is important: -# bootopts.sh (boot options) must start first, system.sh after network.sh -# (tazx needs an active connection to install Xorg), then you are free -# to choose. Note that the local.sh script exists to let you quickly add -# some local startup commands. -RUN_SCRIPTS="bootopts.sh network.sh system.sh local.sh" +# 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. SliTaz only provides a few daemons: firewall, -# Web server (lighttpd), SSH server (dropbear) and rsyncd, so boot order is -# not really important, but dbus/hald should be started before slim. -RUN_DAEMONS="dbus hald slim firewall httpd" +# Daemons to start at boot time. DBUS daemon is started before the +# login manager and from: /etc/init.d/system.sh +RUN_DAEMONS="firewall httpd" # Pre login bold message. -MESSAGE="Welcome to your box." +MESSAGE="Welcome to your box"