# HG changeset patch # User Paul Issott # Date 1219357176 0 # Node ID d9b57e3d7da5d4bf7b38137f305f5be3611ce065 # Parent 945470ee272557db0982e022e006a6e9d8e967a0 en: Add Boot Scripts to Ckbk diff -r 945470ee2725 -r d9b57e3d7da5 en/doc/cookbook/boot-scripts.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/en/doc/cookbook/boot-scripts.html Thu Aug 21 22:19:36 2008 +0000 @@ -0,0 +1,203 @@ + + + + SliTaz Cookbook (en) - Boot Scripts + + + + + + + + + + + + + + + +
+
+ +

Boot scripts

+

+The startup and shutdown scripts with their configuration files. +

+ + + + +

SliTaz and startup

+ +

+SliTaz does not use a level of execution (runlevel), the +system is initialized via a primary script and its main +configuration file. This script itself launches some other smaller +scripts which deal with the internationalization or the +commands placed for the system to start. +

+ + +

/etc/init.d/* - Directory of scripts and daemons

+

+The directory /etc/init.d contains all of the rc scripts, +scripts finishing with '.sh' are simple shell scripts and +daemons such as 'dropbear' or 'lighttpd' are scripts +that launch a service. The daemon scripts can start, stop or +restart through the command: +

+
 # /etc/init.d/daemon [start|stop|restart]
+
+

+On SliTaz you will find a /etc/init.d/README describing the +basic function of rc scripts. Also note that all startup +scripts and daemons can call upon the /etc/init.d/rc.functions +file. This file makes it possible to include various functions +in rc scripts. SliTaz uses a function status to check whether +the previous command has succeeded (0) or not. +

+ + +

/etc/init.d/rcS - Primary initialization script

+

+The /etc/init.d/rcS script configures all the +basic services and initializes the base system. It begins by +mounting the filesystems and starts services like syslogd, klogd, +mdev and cleans up the system and so on. It +uses the configuration file /etc/rcS.conf to see which daemons +and scripts to launch at startup. You can browse the script +to know which commands are executed: +

+
 # nano rootfs/etc/init.d/rcS 
+
+ + + +

Specific scripts and daemons

+ +

bootopts.sh - LiveCD mode options

+

+This script is used to configure the LiveCD options passed +at boot time and is readable via the /proc/cmdline file. +This is the script that allows you to use a USB key or +external hard disk /home partition with the option home=usb +or home=sda[1-9] or directly specify the language and +keyboard parameters. +

+ +

network.sh - Initializing the network

+

+This script searches the network.sh configuration file +/etc/network.conf for the network interface to use; if one wants to +launch the DHCP client (or not) or if you want to use a fixed +(static) IP. On SliTaz the /etc/init.d/network.sh +script configures the network interfaces to start using the +information contained in /etc/network.conf. If the variable +$DHCP is equal to yes, then the /etc/init.d/network.sh +script launches the DHCP client on the $INTERFACE interface. +

+ +

i18n.sh - Internationalization

+

+SliTaz backs up the configuration of the default locale in +/etc/locale.conf which is read by /etc/profile at each +login. The /etc/locale.conf is generated during boot time +thanks to the /etc/i18n.sh script. This script launches the +'tazlocale' application if /etc/locale.conf doesn't exist. +We use the same process for the keyboard layout using 'tazkmap' +and the /etc/kmap.conf configuration file. Both applications +are installed and located in /sbin and use dialog and the +ncurses library. The script also checks whether the +configuration file for the time zone /etc/TZ exists, +otherwise it creates one relying on the keyboard configuration. +

+ +

local.sh - Local commands

+

+The /etc/init.d/local.sh script allows the system administrator +to add local commands to be executed at boot. Example: +

+
#!/bin/sh
+# /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... "
+
+
+ +

rc.shutdown

+

+This script is invoked by /etc/inittab during system shutdown. +It also stops all daemons via the variable RUN_DAEMONS in +the primary /etc/rcS.conf configuration file. +

+ + +

/etc/inittab - Configuration file init

+

+The first file read by the Kernel at boot. It defines the +initialization script (/etc/init.d/rcS), shells (ttys) and +actions in the event of a reboot or disruption. You will find +a complete example with accompanying notes in SliTaz tools: +

+
# /etc/inittab: init configuration for SliTaz GNU/Linux.
+# Boot-time system configuration/initialization script.
+#
+::sysinit:/etc/init.d/rcS
+
+# /sbin/getty respawn shell invocations for selected ttys.
+tty1::respawn:/sbin/getty 38400 tty1
+tty2::respawn:/sbin/getty 38400 tty2
+tty3::respawn:/sbin/getty 38400 tty3
+tty4::respawn:/sbin/getty 38400 tty4
+tty5::respawn:/sbin/getty 38400 tty5
+tty6::respawn:/sbin/getty 38400 tty6
+
+# Stuff to do when restarting the init 
+# process, or before rebooting.
+::restart:/etc/init.d/rc.shutdown
+::restart:/sbin/init
+::ctrlaltdel:/sbin/reboot
+::shutdown:/etc/init.d/rc.shutdown
+
+
+ + +
+ + + + +
+ Copyright © 2008 SliTaz - + GNU General Public License;
+ Documentation is under + GNU Free Documentation License + and code is valid xHTML 1.0. +
+ + + + diff -r 945470ee2725 -r d9b57e3d7da5 en/doc/cookbook/index.html --- a/en/doc/cookbook/index.html Tue Aug 19 21:44:00 2008 +0000 +++ b/en/doc/cookbook/index.html Thu Aug 21 22:19:36 2008 +0000 @@ -35,7 +35,9 @@
  • Wok & Tools. - SliTaz Package Tools.
  • Receipts. - Receipts for creating SliTaz packages.
  • Tazwok manual. - Manual for compiling & generating packages for SliTaz.
  • +
  • Boot Scripts - The startup and shutdown scripts.
  • SliTaz Tools - The Toolbox.
  • +

    About this Cookbook

    diff -r 945470ee2725 -r d9b57e3d7da5 en/doc/cookbook/slitaz-tools.html --- a/en/doc/cookbook/slitaz-tools.html Tue Aug 19 21:44:00 2008 +0000 +++ b/en/doc/cookbook/slitaz-tools.html Thu Aug 21 22:19:36 2008 +0000 @@ -18,7 +18,6 @@