slitaz-boot-scripts view usr/bin/rcSconf @ rev 460

rcSconf: remove empty rcS.conf.diff
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Apr 14 16:50:08 2020 +0000 (2020-04-14)
parents 7acd64a8f538
children
line source
1 #!/bin/sh
2 #
3 # Update and clean-up /etc/rcS.conf
4 #
6 # X is now started earlier by system.sh
7 up_daemons() {
8 echo $RUN_DAEMONS | sed \
9 -e s/dbus// -e s/hald// -e s/slim// -e s'/ //' -e s'/ //'
10 }
12 case "$1" in
13 up)
14 [ $(id -u) != 0 ] && exit 0
15 #check_root: broken gettext in libtaz.sh
16 . /etc/rcS.conf
17 cp -f /etc/rcS.conf /etc/slitaz/rcS.conf.bak
18 echo "Updating: /etc/rcS.conf"
19 cat > /etc/rcS.conf << EOT
20 # /etc/rcS.conf : Initial boot script configuration for SliTaz GNU/Linux
21 # Sourced by : /etc/init.d/rcS
22 #
24 # Use udev to populate /dev and handle hotplug events
25 UDEV="$UDEV"
27 # Clean up the system removing all tmp and pid files
28 CLEAN_UP_SYSTEM="$CLEAN_UP_SYSTEM"
30 # Filesystems to check integrity of at boot time. You should check the
31 # rootfs (where SliTaz is installed) and all partitions listed in fstab.
32 # Example: CHECK_FS="/dev/hda5 /dev/hdb1"
33 CHECK_FS="$CHECK_FS"
35 # Syslogd: Max size (KB) before rotation
36 SYSLOGD_ROTATED_SIZE="$SYSLOGD_ROTATED_SIZE"
38 # Kernel modules to load at boot time
39 LOAD_MODULES="$LOAD_MODULES"
41 # X Login manager: slim or lxdm, empty to disable X
42 LOGIN_MANAGER="slim"
44 # Initialization scripts to run at boot time. The local.sh script
45 # lets you quickly add some local startup commands.
46 RUN_SCRIPTS="bootopts.sh system.sh network.sh local.sh"
48 # Daemons to start at boot time. DBUS daemon is started before the
49 # login manager and from: /etc/init.d/system.sh
50 RUN_DAEMONS="$(up_daemons)"
52 # Pre login message
53 MESSAGE="Welcome to your box"
54 EOT
55 diff /etc/slitaz/rcS.conf.bak /etc/rcS.conf > \
56 /etc/slitaz/rcS.conf.diff
57 [ -s /etc/slitaz/rcS.conf.diff ] ||
58 rm -f /etc/slitaz/rcS.conf* ;;
59 show) less -E /etc/rcS.conf ;;
60 show-diff) less -E /etc/slitaz/rcS.conf.diff 2> /dev/null ;;
61 clean) rm -f /etc/slitaz/rcS.conf* ;;
62 *) echo "Usage: $(basename $0) [up|show|show-diff|clean]" ;;
63 esac
64 exit 0