lfs/bootscripts
Pierre Labastie 27d23b1d41 Change semantics of S and K files
Presently, there are a lot of special cases:
- runlevel 0 and 6 unconditionally run "script stop" if they
  find a Kxxscript symlink. This may lead to trying to stop an
  already stopped device if for example switching to runlevel 0/6
  from runlevel 1. This can be fixed by stating the convention
  that it is the responsability of scripts to check that the service
  is running before killing it (or not running before starting it).
  Still, we shouldn't try to stop a service if it was marked K in
  the previous runlevel. And same for S files: we shouldn't try to
  start a service that was marked S in the previous runlevel. Note
  that changing runlevel is not a "reset": if a user has manually
  changed the state of a daemon, this state will remain the same
  upon changing runlevel if the S/K status of that dameon is
  the same in both runlevels.

- Sxxscript symlinks in runlevel 0/6 are run as "script stop"
  instead of the more intuitive "script start". This does not interact
  well with LSB-tools (some scripts would need "Default-Start: S 0 6"
  but then it is impossible to get correct "Required-Start" or
  "Should-Start" fields). Furthermore, having a counter-intuitive
  behavior is error prone. So now runlevel 0/6 will run "script
  sart" for a Sxxscript.
2022-03-25 10:19:53 +01:00
..
lfs Change semantics of S and K files 2022-03-25 10:19:53 +01:00
ChangeLog Remove spaces at end of lines - bootscripts 2021-09-07 23:01:23 +02:00
Makefile Make runlevel 2 equivalent to 3 by default: Makefile 2022-03-25 10:19:52 +01:00
README Remove spaces at end of lines - bootscripts 2021-09-07 23:01:23 +02:00

Network Configuration:
   Script Files:
      /etc/rc.d/init.d/*
      /sbin/ifup
      /sbin/ifdown
      /lib/lsb/*

   Configuration Files:
      /etc/sysconfig/ifconfig.*
      Note: ifconfig.* files will be processed
            in alphanumerical order on boot, and reversed on shutdown.
      - IFACE  : The interface that is being configured (e.g. eth0)
      - SERVICE: Which script to run in services directory.
      - ONBOOT : If set to yes, this interface will be started on bootup

      /etc/sysconfig/network
      - HOSTNAME: Value of the system's hostname  (From LFS Book)
                  This value may also be set in /etc/sysconfig/rc.site

   Additional Configuration:
      SERVICE ipv4-static:
      - IP       : Static IP Address
      - GATEWAY  : Specifies the IP Address of the gateway server
      - PREFIX   : CIDR prefix of IP Address, defaults to 24 if not set
      - PEER     : IP Address of peer (for point-to-point connections and tunnels)
      - BROADCAST: Broadcast address

      SERVICE ipv4-static-route:
      - TYPE   : network (default type if not specified), default, host or unreachable
      - IP     : IP Address of target (for network, host and unreachable)
      - PREFIX : CIDR prefix of target (for network, host and unreachable)
      - GATEWAY: IP Address of gateway to reach target (for network and default)


SetClock configuration:

   Configuration Files:
      /etc/sysconfig/clock or /etc/sysconfig/rc.site
      - UTC: 1 assumes hwclock is in UTC
             0 assumes hwclock is in local time
      - CLOCKPARAMS: any additional options to be passed to hwclock

CleanFS configuration:
   Script Files:
      /etc/rc.d/init.d/cleanfs

   Configuration Files:
      /etc/sysconfig/rc.site
      - SKIPTMPCLEAN: skips cleaning of /tmp directory

      /etc/sysconfig/createfiles
         Each line is parsed, using space as a deliminator.
         [NAME] [TYPE] [PERMISSIONS] [USER] [GROUP]
         The below fields are currently only used on dev type.
         ([DEV TYPE] [MAJOR#] [MINOR#])
         Name:
            File/Directory/Device name
         Type:
            dir:  creates a directory
            file: creates a file
            dev:  creates a device
         Permissions:
            chmod the created file
         User/Group:
            chown the created file/dir to this user/group
         Dev Type:
            char:  character [needs MAJOR#, MINOR#]
            block: block     [needs MAJOR#, MINOR#]
            pipe:  pipe
         Major#:
            Used by character and block devices.
         Minor#:
            Used by character and block devices.