X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage2%2Fcis-sysvinit;h=01f29d9c85917b2ed935bf4a716e394465b87c93;hb=3605ab38ca7604b1fe43c3bce5e4963730a85d39;hp=a3906b35c6c01da84c5d86adc855d35f603f72ea;hpb=b2f91df3e7c1d1ca93ced97b5001e3134243666b;p=hvlinux.git diff --git a/stage2/cis-sysvinit b/stage2/cis-sysvinit index a3906b3..01f29d9 100755 --- a/stage2/cis-sysvinit +++ b/stage2/cis-sysvinit @@ -1,5 +1,5 @@ -#!/bin/sh -# First argument of this script is the package name +#!/bin/bash +set -o errexit # Reading system configuration informations, functions and package versions. source ../sysinfos @@ -7,79 +7,20 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1} && -sed -i 's@Sending processes@& started by init@g' src/init.c && -make -j ${MAKEJOBS} -C src && -make -C src install && +cd ${LFS_TMP}/${1} -# Configuring Sysvinit -cat > /etc/inittab << "EOF" && -# /etc/inittab -# -# SysVinit +sed -i 's@Sending processes@& configured via /etc/inittab@g' src/init.c -# Each non-comment line is a data record entry with the following format: -# ::: -# -# id: Unique sequence of 1-4 characters identifying an entry in inittab -# runlevels: lists the runlevels for which the specified action should be taken -# action: describes which action should be taken -# process: specifies the process to be executed +# A maintained version of the wall program was installed earlier by +# Util-linux-ng. Suppress the installation of Sysvinit's version: +sed -i -e 's/utmpdump wall/utmpdump/' \ + -e 's/mountpoint.1 wall.1/mountpoint.1/' src/Makefile -# Default runlevel -id:3:initdefault: +make -j ${MAKEJOBS} -C src +make -C src install -# System initialization before anything else (runs when system boots). -si::sysinit:/etc/rc.d/init.d/rc S +# /etc/inittab was installed in stage 1 -# System halting -l0:0:wait:/etc/rc.d/init.d/rc 0 - -# Single-user mode -l1:1:wait:/etc/rc.d/init.d/rc 1 - -# Not used -l2:2:wait:/etc/rc.d/init.d/rc 2 - -# Full multi-user mode -l3:3:wait:/etc/rc.d/init.d/rc 3 - -# Not used -l4:4:wait:/etc/rc.d/init.d/rc 4 - -# Full multi-user mode (X-windows) -l5:5:wait:/etc/rc.d/init.d/rc 5 - -# System reboot -l6:6:wait:/etc/rc.d/init.d/rc 6 - -# Trap CTRL-ALT-DELETE -ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now - -su:S016:once:/sbin/sulogin - -# getty-programs for the normal runlevels -# 'getty' opens a tty port, prompts for a login name and invokes the -# /bin/login command. -# The field MUST be the same as the last -# characters of the device (after "tty"). -1:12345:respawn:/sbin/agetty 38400 tty1 -2:2345:respawn:/sbin/agetty 38400 tty2 -3:2345:respawn:/sbin/agetty 38400 tty3 -4:2345:respawn:/sbin/agetty 38400 tty4 -5:2345:respawn:/sbin/agetty 38400 tty5 -6:2345:respawn:/sbin/agetty 38400 tty6 - -# Run xdm or kdm in runlevel 5 -# kdm or xdm is now a separate service -x:5:respawn:/usr/X11R6/bin/xdm -nodaemon -EOF - -if [ "x${INST_TYPE}" = "xworkstation" ]; then - chmod u+s /sbin/halt || exit 1 -fi - -# Return last error exit $?