#!/bin/sh
-# First argument of this script is the package name
+set -o errexit
# Reading system configuration informations, functions and package versions.
source ../sysinfos
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>:<runlevels>:<action>:<process>
-#
-# 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 <id> 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
-
-# Return last error
exit $?