wok-tiny diff base-tiny/stuff/etc/init.d/rcS @ rev 160

Add geninitramfs & busybox-net (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Feb 29 15:55:26 2020 +0100 (2020-02-29)
parents df0a7ccded6c
children 00ad93bee405
line diff
     1.1 --- a/base-tiny/stuff/etc/init.d/rcS	Sat Aug 31 18:58:32 2019 +0200
     1.2 +++ b/base-tiny/stuff/etc/init.d/rcS	Sat Feb 29 15:55:26 2020 +0100
     1.3 @@ -1,23 +1,11 @@
     1.4  #!/bin/sh
     1.5 -# /etc/init.d/rcS - Initial boot script for SliTaz GNU/Linux.
     1.6 -# Config file is : /etc/rcS.conf
     1.7 -#
     1.8 -# rcS is the main initialization script used to check fs, mount, clean,
     1.9 -# run scripts and start daemons.
    1.10 -#
    1.11  . /etc/init.d/rc.functions
    1.12  . /etc/rcS.conf
    1.13 -
    1.14 -# Set TZ and boot time.
    1.15  [ -s /etc/TZ ] && export TZ="$(cat /etc/TZ)"
    1.16 -
    1.17  echo "Processing /etc/init.d/rcS..."
    1.18 -
    1.19 -# Mount /proc.
    1.20  echo -n "Mounting proc filesystem..."
    1.21  mount proc
    1.22  status
    1.23 -
    1.24  if [ "$EARLY_RUN_SCRIPTS" ]; then
    1.25  	echo "Executing early initialization scripts..."
    1.26  	for script in $EARLY_RUN_SCRIPTS
    1.27 @@ -25,8 +13,6 @@
    1.28  		[ -x /etc/init.d/$script ] && /etc/init.d/$script
    1.29  	done
    1.30  fi
    1.31 -
    1.32 -# Load all modules listed in config file.
    1.33  if [ "$LOAD_MODULES" ]; then
    1.34  	echo -n "Loading modules..."
    1.35  	depmod
    1.36 @@ -38,32 +24,15 @@
    1.37  	status
    1.38  	[ "$KEEP_MODULES" ] || rm -rf /lib/modules 2> /dev/null
    1.39  fi
    1.40 -
    1.41 -# Mount /sys.
    1.42  echo -n "Mounting sys filesystem..."
    1.43  mount sysfs
    1.44  status
    1.45 -
    1.46  if [ -e /sbin/mdev ]; then
    1.47  	echo -n "Start hotplug..."
    1.48  	echo /sbin/mdev > /proc/sys/kernel/hotplug
    1.49  	mdev -s
    1.50  	status
    1.51  fi
    1.52 -
    1.53 -echo -n "Updating /dev..."
    1.54 -for i in /sys/block/*/dev /sys/block/*/*/dev ; do
    1.55 -	[ -s "$i" ] || continue
    1.56 -	n=${i%/dev}
    1.57 -	n=/dev/${n##*/}
    1.58 -	[ -e $n ] && continue
    1.59 -	echo -n " ${n##*/}"
    1.60 -	mknod $n b $(sed 's/:/ /' < $i)
    1.61 -done
    1.62 -status
    1.63 -
    1.64 -# Before mounting filesystems we check fs specified in the file
    1.65 -# /etc/rcS.conf and variable $CHECK_FS.
    1.66  if [ "$CHECK_FS" ]; then
    1.67  	mount -o remount,ro /
    1.68  	for i in $CHECK_FS
    1.69 @@ -72,20 +41,11 @@
    1.70  		e2fsck -p $i
    1.71  	done
    1.72  fi
    1.73 -
    1.74 -# Remount rootfs rw.
    1.75  echo "Remounting rootfs read/write..."
    1.76  mount -o remount,rw /
    1.77 -
    1.78 -# Mount filesystems in /etc/fstab.
    1.79  echo "Mounting filesystems in fstab..."
    1.80  mount -a
    1.81 -
    1.82 -# Store boot messages to log files.
    1.83  dmesg > /var/log/dmesg.log &
    1.84 -
    1.85 -# Parse cmdline args for earlier boot options. All other boot options
    1.86 -# are in /etc/init./bootopts.sh.
    1.87  echo -n "Searching for early boot options..."
    1.88  for opt in $(cat /proc/cmdline)
    1.89  do
    1.90 @@ -99,8 +59,6 @@
    1.91  	esac
    1.92  done
    1.93  status
    1.94 -
    1.95 -# Clean up the system.
    1.96  if [ "$CLEAN_UP_SYSTEM" = "yes" ]; then
    1.97  	echo -n "Cleaning up the system..."
    1.98  	find /var/run -name "*.pid" -type f | xargs rm -f
    1.99 @@ -112,9 +70,6 @@
   1.100  	echo -n "Keeping all tmp and pid files..."
   1.101  	status
   1.102  fi
   1.103 -
   1.104 -# Create /dev/cdrom if needed (symlink does not exist on LiveCD).
   1.105 -# Also add /dev/cdrom to fstab if entry does not exist.
   1.106  if [  "$CDROM" ]; then
   1.107  	DRIVE_NAME=${CDROM#/dev/}
   1.108  else
   1.109 @@ -133,9 +88,6 @@
   1.110  		>> /etc/fstab
   1.111  	status
   1.112  fi
   1.113 -
   1.114 -# Handle kernel cmdline parameter config=<device>,<path> to source a
   1.115 -# disk init script
   1.116  if [ "$CONFIG" ]; then
   1.117  	DEVICE=${CONFIG%,*}
   1.118  	SCRIPT=${CONFIG#*,}
   1.119 @@ -158,15 +110,11 @@
   1.120  	fi
   1.121  	status
   1.122  fi
   1.123 -
   1.124 -# Mount /proc/bus/usb.
   1.125  if [ -d /proc/bus/usb ]; then
   1.126  	echo -n "Mounting /proc/bus/usb filesystem..."
   1.127  	mount -t usbfs usbfs /proc/bus/usb
   1.128  	status
   1.129  fi
   1.130 -
   1.131 -# Start syslogd and klogd.
   1.132  if [ "$KERNEL_LOG_DAEMONS" = "yes" ]; then
   1.133  	echo -n "Starting system log deamon: syslogd..."
   1.134  	syslogd -s $SYSLOGD_ROTATED_SIZE && status
   1.135 @@ -175,23 +123,18 @@
   1.136  else
   1.137  	echo "Kernel log daemons are disabled in /etc/rc.conf..."
   1.138  fi
   1.139 -
   1.140  [ -d /usr/share/kmap ] && echo -n "Load keymap..." &&
   1.141  cat /usr/share/kmap/* | { /bin/loadkmap 2>/dev/null || loadkmap; } &&
   1.142  rm -rf /usr/share/kmap && status
   1.143 -
   1.144 -# Start all scripts specified with $RUN_SCRIPTS.
   1.145 +echo -n "Setting hostname..."
   1.146 +hostname -F /etc/hostname
   1.147 +status
   1.148  echo "Executing all initialization scripts..."
   1.149  for script in $RUN_SCRIPTS
   1.150  do
   1.151  	[ -x /etc/init.d/$script ] && /etc/init.d/$script
   1.152  done
   1.153 -
   1.154 -# Re-source main config file. In Live mode, daemons list can be modified
   1.155 -# by boot options (screen=text will remove slim).
   1.156  . /etc/rcS.conf
   1.157 -
   1.158 -# Start all daemons specified with $RUN_DAEMONS.
   1.159  echo "Starting all daemons specified in /etc/rcS.conf..."
   1.160  for daemon in $RUN_DAEMONS
   1.161  do
   1.162 @@ -199,8 +142,6 @@
   1.163  		/etc/init.d/$daemon start
   1.164  	fi
   1.165  done
   1.166 -
   1.167 -# Reset screen and display a bold message.
   1.168  if [  "$MESSAGE" ]; then
   1.169  	reset
   1.170  	echo -e "\033[1m$MESSAGE\033[0m"