diff options
author | Pierre Labastie <pierre.labastie@neuf.fr> | 2021-09-07 23:01:23 +0200 |
---|---|---|
committer | Pierre Labastie <pierre.labastie@neuf.fr> | 2021-09-07 23:01:23 +0200 |
commit | a44ae5771fefbb0487ffa0108fe9287491542733 (patch) | |
tree | 68db1aa88f99873f909d74612f1560590e1d6674 /bootscripts | |
parent | e7fb2ca433fe6287226b0cd8e6f411717e8d6c1a (diff) |
Remove spaces at end of lines - bootscripts
Diffstat (limited to 'bootscripts')
-rw-r--r-- | bootscripts/ChangeLog | 53 | ||||
-rw-r--r-- | bootscripts/Makefile | 4 | ||||
-rw-r--r-- | bootscripts/README | 2 | ||||
-rw-r--r-- | bootscripts/lfs/init.d/checkfs | 8 | ||||
-rw-r--r-- | bootscripts/lfs/init.d/cleanfs | 14 | ||||
-rw-r--r-- | bootscripts/lfs/init.d/console | 18 | ||||
-rw-r--r-- | bootscripts/lfs/init.d/modules | 8 | ||||
-rw-r--r-- | bootscripts/lfs/init.d/mountvirtfs | 8 | ||||
-rw-r--r-- | bootscripts/lfs/init.d/network | 2 | ||||
-rw-r--r-- | bootscripts/lfs/init.d/rc | 18 | ||||
-rw-r--r-- | bootscripts/lfs/init.d/setclock | 2 | ||||
-rw-r--r-- | bootscripts/lfs/init.d/swap | 2 | ||||
-rw-r--r-- | bootscripts/lfs/init.d/udev | 4 | ||||
-rw-r--r-- | bootscripts/lfs/init.d/udev_retry | 6 | ||||
-rw-r--r-- | bootscripts/lfs/lib/services/init-functions | 34 | ||||
-rwxr-xr-x | bootscripts/lfs/lib/services/ipv4-static-route | 8 | ||||
-rwxr-xr-x | bootscripts/lfs/sbin/ifdown | 6 | ||||
-rwxr-xr-x | bootscripts/lfs/sbin/ifup | 14 | ||||
-rw-r--r-- | bootscripts/lfs/sbin/ifup.8 | 66 | ||||
-rw-r--r-- | bootscripts/lfs/sysconfig/createfiles | 6 |
20 files changed, 141 insertions, 142 deletions
diff --git a/bootscripts/ChangeLog b/bootscripts/ChangeLog index 8d37e862f..f8411c737 100644 --- a/bootscripts/ChangeLog +++ b/bootscripts/ChangeLog @@ -6,7 +6,7 @@ * Prevent sendsignals from killing an active mdmon 2021-04-28 Bruce Dubbs <bdubbs@linuxfromscratch.org> - * Make check_signal more robust. + * Make check_signal more robust. * Use a better methog for killproc to remove a dead pid file. * Clarify what signals killproc accepts. * Thanks to input and discussion from Scott Andrews. @@ -84,7 +84,7 @@ 2013-01-24 Bruce Dubbs <bdubbs@linuxfromscratch.org> * Remove local attribue of some variables for Bourne shell compatability - * Specify /bin/echo in commands with -e switch for + * Specify /bin/echo in commands with -e switch for Bourne shell compatability 2012-10-13 Bruce Dubbs <bdubbs@linuxfromscratch.org> @@ -121,7 +121,7 @@ ** ifdown now only uses the first SERVICE ** Updated ifup.8 to reflect current usage ** ifup - *** Move interface up logic to after service scripts. Eliminates the + *** Move interface up logic to after service scripts. Eliminates the need for the LINK_CHECK variable. *** Sets the GATEWAY if the variable is set *** Add MTU logic to ifup @@ -167,10 +167,10 @@ *** /lib/lsb is a symlink to /lib/services. * Create convenience symlink /etc/init.d->/etc/rc.d/init.d. * Add help and man pages to upup/ifdown. - * Append /run/var/bootlog to /var/log/boot.log at the end of + * Append /run/var/bootlog to /var/log/boot.log at the end of the boot sequence. * Add capabiltiy to step through the boot scripts at boot time - * Optionally allow environment variables in sysconfig directory's + * Optionally allow environment variables in sysconfig directory's console, network, and clock files to be placed in rc.site. * Add an optional FASTBOOT parameter to set /fastboot when rebooting. @@ -183,11 +183,11 @@ HEADLESS=1 to skip READ commands ** Add /etc/sysconfig/init_params for adding environmental parameters to all functions used in bootscripts - ** Move network configuration to /etc/sysconfig/ifconfig.*. The - ifconfig files can have any extension. Use IFACE parameter to + ** Move network configuration to /etc/sysconfig/ifconfig.*. The + ifconfig files can have any extension. Use IFACE parameter to specify the target network interface within the configuration file. - ** Adds an optional parameter, SKIPTMPCLEAN, to skip the removal of - files in /tmp at bootup. Specify the variable in + ** Adds an optional parameter, SKIPTMPCLEAN, to skip the removal of + files in /tmp at bootup. Specify the variable in /etc/sysconfig/init_params. 2011-05-31 DJ Lucas <dj@linuxfromscratch.org> @@ -223,8 +223,8 @@ 2009-01-02 Bruce Dubbs <bdubbs@linuxfromscratch.org> * lfs/init.d/functions: - * lfs/sysconfig/network-devices/ifup: - Updated line widths to accommodate pdf generation in both the above + * lfs/sysconfig/network-devices/ifup: + Updated line widths to accommodate pdf generation in both the above files. 2008-10-27 DJ Lucas <dj@linuxfromscratch.org> @@ -341,7 +341,7 @@ n/a - June 2, 2006 * Removed console config file and makefile targets. - * Removed references to /dev/bug and bugreport in udevand + * Removed references to /dev/bug and bugreport in udev and udev_retry bootscripts. (DJ Lucas) n/a - April 17, 2006 @@ -350,13 +350,13 @@ n/a - April 17, 2006 partition or for some other reason fail the initial replay. (Archaic) n/a - April 15, 2006 - * Cleaned up contrib directory. Removed: contrib/init.d, - contrib/enhanced, contrib/livecd, contrib/hotplug, and raq2 + * Cleaned up contrib directory. Removed: contrib/init.d, + contrib/enhanced, contrib/livecd, contrib/hotplug, and raq2 patch. (DJ Lucas) n/a - April 14, 2006 * Merged changes from udev_update branch (DJ Lucas) - * Replaced a return with an exit and reversed comment changes in + * Replaced a return with an exit and reversed comment changes in udev bootscript. (Dan Nicholson) * Replaced walk_sysfs function in udev bootscript with new udevtrigger program and move wait_for_uevents function inline. (DJ Lucas) @@ -369,7 +369,7 @@ n/a - March 21, 2006 to boot_mesg_flush in echo_* functions. (DJ Lucas) n/a - March 10, 2006 - * Moved src argument to ipv4-static-route service script and + * Moved src argument to ipv4-static-route service script and removed from ipv4-static service script. (DJ Lucas) n/a - March 8. 2006 @@ -388,13 +388,13 @@ n/a - September 11, 2005 * Fixed display error with LSB init-functions script * Made above killproc/print_status changes in enhanced bootscripts. - * Made logger service configurable in enhanced + * Made logger service configurable in enhanced bootscripts. (DJ Lucas) n/a - August 14, 2005 - * Added -s flag to pidofproc() for backwards + * Added -s flag to pidofproc() for backwards compatibility (DJ Lucas) - * Fixed erronous values returned by pidofproc() which + * Fixed erronous values returned by pidofproc() which broke the functionality of statusproc (DJ Lucas) n/a - July 1, 2005 @@ -402,8 +402,8 @@ n/a - July 1, 2005 function for ash compliancy (Nathan Coulson) n/a - June 26, 2005 - * Removed consolelog script from contrib - * Updated interactive rc script in contrib and added + * Removed consolelog script from contrib + * Updated interactive rc script in contrib and added README.rc-Interactive, added install target to the Makefile. (DJ Lucas) @@ -599,7 +599,7 @@ n/a - September 22, 2004 n/a - September 21, 2004 * boot_mesg has been enhanced. Subsequent calls will overwrite - previous text, and it will wrap text basedupon the variable ${WCOL}. + previous text, and it will wrap text basedupon the variable ${WCOL}. (James Robertson) * Fixed mtu optional service typo (Kevin P Fleming) * Added SOURCE variable to ipv4-static-route (Kevin P Fleming) @@ -608,7 +608,7 @@ n/a - September 16, 2004 * nework interfaces are now brought down in reverse order n/a - September 15, 2004 - * Added blue bracket, from dj's 3.0-pre1 bootscript package + * Added blue bracket, from dj's 3.0-pre1 bootscript package [echo_failure, echo_warning, and echo_ok] * Added a new function called boot_mesg, meant to replace the echo command. @@ -632,11 +632,10 @@ n/a - August 7, 2004 * Added missing error redirect (/dev/null) in getpids. (DJ) n/a - August 4, 2004 - * Added MODE, DIRMODE, and CONFMODE variables to the makefile + * Added MODE, DIRMODE, and CONFMODE variables to the makefile to allow permissions to be set at install. (DJ) n/a - July 31, 2004 - * Moved PIDFILE check to getpids and removed arguments from killproc and reloadproc. Signals are now set at beginning of funtcions script with KILLDELAY. (DJ) @@ -645,7 +644,7 @@ n/a - July 31, 2004 n/a - July 21, 2004 - * Committed DJ Lucas's patch for the killproc function. It no + * Committed DJ Lucas's patch for the killproc function. It no longer requires arguments if PIDFILE is set * added --backup to all sysconfig configuration files, so they are not replaced on a make install @@ -978,7 +977,7 @@ n/a - March 20, 2004 * Added create-service-dir target and removed from create-dirs * Changed service script install targets to use create-service-dir - * Added check for dhcpcd service script for stale pid file + * Added check for dhcpcd service script for stale pid file Suggested by Jeremy * Added ifconfig to ipx service script for hosting device not up diff --git a/bootscripts/Makefile b/bootscripts/Makefile index 4686c6ff2..50b63ad3b 100644 --- a/bootscripts/Makefile +++ b/bootscripts/Makefile @@ -29,7 +29,7 @@ create-dirs: ln -sfn services ${LIBDIR}/lsb ln -sfn rc.d/init.d ${ETCDIR}/init.d -files: create-dirs +files: create-dirs install -m ${MODE} lfs/init.d/checkfs ${ETCDIR}/rc.d/init.d/ install -m ${MODE} lfs/init.d/cleanfs ${ETCDIR}/rc.d/init.d/ install -m ${MODE} lfs/init.d/halt ${ETCDIR}/rc.d/init.d/ @@ -126,7 +126,7 @@ rc6: files uninstall: rm -rf ${DESTDIR}/lib/services ${DESTDIR}/lib/lsb ${ETCDIR}/rc.d ${ETCDIR}/init.d \ ${SBIN}/ifup ${SBIN}/ifdown ${MAN8}/ifup.8 ${MAN8}/ifdown.8 \ - ${ETCDIR}/sysconfig/rc + ${ETCDIR}/sysconfig/rc .PHONY: all create-dirs install files links rcS rc0 rc1 rc2 rc3 rc4 rc5 rc6 uninstall diff --git a/bootscripts/README b/bootscripts/README index 9c08faf39..8753c95b0 100644 --- a/bootscripts/README +++ b/bootscripts/README @@ -48,7 +48,7 @@ CleanFS configuration: /etc/sysconfig/rc.site - SKIPTMPCLEAN: skips cleaning of /tmp directory - /etc/sysconfig/createfiles + /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. diff --git a/bootscripts/lfs/init.d/checkfs b/bootscripts/lfs/init.d/checkfs index 061d136e5..584921983 100644 --- a/bootscripts/lfs/init.d/checkfs +++ b/bootscripts/lfs/init.d/checkfs @@ -61,7 +61,7 @@ case "${1}" in msg="${msg}halted and powered off.\n\n" log_failure_msg "${msg}" - log_info_msg "Press Enter to continue..." + log_info_msg "Press Enter to continue..." wait_for_user /etc/rc.d/init.d/halt stop else @@ -69,7 +69,7 @@ case "${1}" in fi if [ -f /forcefsck ]; then - msg="/forcefsck found, forcing file" + msg="/forcefsck found, forcing file" msg="${msg} system checks as requested." log_success_msg "$msg" options="-f" @@ -108,7 +108,7 @@ case "${1}" in msg="${msg}this system will be rebooted\n\n" log_failure_msg "$msg" - log_info_msg "Press Enter to continue..." + log_info_msg "Press Enter to continue..." wait_for_user reboot -f fi @@ -125,7 +125,7 @@ case "${1}" in msg="${msg}halted and powered off.\n\n" log_failure_msg "$msg" - log_info_msg "Press Enter to continue..." + log_info_msg "Press Enter to continue..." wait_for_user /etc/rc.d/init.d/halt stop fi diff --git a/bootscripts/lfs/init.d/cleanfs b/bootscripts/lfs/init.d/cleanfs index bbca3ddf6..c75923c34 100644 --- a/bootscripts/lfs/init.d/cleanfs +++ b/bootscripts/lfs/init.d/cleanfs @@ -22,7 +22,7 @@ # Default-Stop: # Short-Description: Cleans temporary directories early in the boot process. # Description: Cleans temporary directories /run, /var/lock, and -# optionally, /tmp. cleanfs also creates /run/utmp +# optionally, /tmp. cleanfs also creates /run/utmp # and any files defined in /etc/sysconfig/createfiles. # X-LFS-Provided-By: LFS ### END INIT INFO @@ -30,7 +30,7 @@ . /lib/lsb/init-functions # Function to create files/directory on boot. -create_files() +create_files() { # Input to file descriptor 9 and output to stdin (redirection) exec 9>&0 < /etc/sysconfig/createfiles @@ -63,13 +63,13 @@ create_files() pipe) mknod "${name}" p ;; - *) - log_warning_msg "\nUnknown device type: ${dtype}" + *) + log_warning_msg "\nUnknown device type: ${dtype}" ;; esac ;; *) - log_warning_msg "\nUnknown type: ${type}" + log_warning_msg "\nUnknown type: ${type}" continue ;; esac @@ -87,10 +87,10 @@ create_files() case "${1}" in start) - log_info_msg "Cleaning file systems:" + log_info_msg "Cleaning file systems:" if [ "${SKIPTMPCLEAN}" = "" ]; then - log_info_msg2 " /tmp" + log_info_msg2 " /tmp" cd /tmp && find . -xdev -mindepth 1 ! -name lost+found -delete || failed=1 fi diff --git a/bootscripts/lfs/init.d/console b/bootscripts/lfs/init.d/console index 3d3b5e0b1..6eb111640 100644 --- a/bootscripts/lfs/init.d/console +++ b/bootscripts/lfs/init.d/console @@ -32,7 +32,7 @@ # Native English speakers probably don't have /etc/sysconfig/console at all [ -r /etc/sysconfig/console ] && . /etc/sysconfig/console -is_true() +is_true() { [ "$1" = "1" ] || [ "$1" = "yes" ] || [ "$1" = "true" ] } @@ -43,8 +43,8 @@ case "${1}" in start) # See if we need to do anything if [ -z "${KEYMAP}" ] && [ -z "${KEYMAP_CORRECTIONS}" ] && - [ -z "${FONT}" ] && [ -z "${LEGACY_CHARSET}" ] && - ! is_true "${UNICODE}"; then + [ -z "${FONT}" ] && [ -z "${LEGACY_CHARSET}" ] && + ! is_true "${UNICODE}"; then exit 0 fi @@ -85,7 +85,7 @@ case "${1}" in [ -z "${KEYMAP}" ] || loadkeys ${KEYMAP} >/dev/null 2>&1 || failed=1 - + [ -z "${KEYMAP_CORRECTIONS}" ] || loadkeys ${KEYMAP_CORRECTIONS} >/dev/null 2>&1 || failed=1 @@ -97,16 +97,16 @@ case "${1}" in # If any of the commands above failed, the trap at the # top would set $failed to 1 - ( exit $failed ) + ( exit $failed ) evaluate_retval exit $failed - ;; + ;; - *) + *) echo "Usage: ${0} {start}" - exit 1 - ;; + exit 1 + ;; esac # End console diff --git a/bootscripts/lfs/init.d/modules b/bootscripts/lfs/init.d/modules index eabcde5a2..3ef4cec0d 100644 --- a/bootscripts/lfs/init.d/modules +++ b/bootscripts/lfs/init.d/modules @@ -37,7 +37,7 @@ case "${1}" in [ -r /etc/sysconfig/modules ] || exit 0 egrep -qv '^($|#)' /etc/sysconfig/modules || exit 0 - log_info_msg "Loading modules:" + log_info_msg "Loading modules:" # Only try to load modules if the user has actually given us # some modules to load. @@ -54,7 +54,7 @@ case "${1}" in # Print the module name if successful, otherwise take note. if [ $? -eq 0 ]; then - log_info_msg2 " ${module}" + log_info_msg2 " ${module}" else failedmod="${failedmod} ${module}" fi @@ -63,10 +63,10 @@ case "${1}" in # Print a message about successfully loaded modules on the correct line. log_success_msg2 - # Print a failure message with a list of any modules that + # Print a failure message with a list of any modules that # may have failed to load. if [ -n "${failedmod}" ]; then - log_failure_msg "Failed to load modules:${failedmod}" + log_failure_msg "Failed to load modules:${failedmod}" exit 1 fi ;; diff --git a/bootscripts/lfs/init.d/mountvirtfs b/bootscripts/lfs/init.d/mountvirtfs index e642546df..3507beea7 100644 --- a/bootscripts/lfs/init.d/mountvirtfs +++ b/bootscripts/lfs/init.d/mountvirtfs @@ -39,7 +39,7 @@ case "${1}" in mkdir -p /run/lock /run/shm chmod 1777 /run/shm /run/lock - log_info_msg "Mounting virtual file systems: ${INFO}/run" + log_info_msg "Mounting virtual file systems: ${INFO}/run" if ! mountpoint /proc >/dev/null; then log_info_msg2 " ${INFO}/proc" @@ -47,17 +47,17 @@ case "${1}" in fi if ! mountpoint /sys >/dev/null; then - log_info_msg2 " ${INFO}/sys" + log_info_msg2 " ${INFO}/sys" mount -o nosuid,noexec,nodev /sys || failed=1 fi if ! mountpoint /dev >/dev/null; then - log_info_msg2 " ${INFO}/dev" + log_info_msg2 " ${INFO}/dev" mount -o mode=0755,nosuid /dev || failed=1 fi ln -sfn /run/shm /dev/shm - + (exit ${failed}) evaluate_retval exit $failed diff --git a/bootscripts/lfs/init.d/network b/bootscripts/lfs/init.d/network index 710cfcfd4..c60b9ff5b 100644 --- a/bootscripts/lfs/init.d/network +++ b/bootscripts/lfs/init.d/network @@ -43,7 +43,7 @@ case "${1}" in stop) # Unmount any network mounted file systems - umount --all --force --types nfs,cifs,nfs4 + umount --all --force --types nfs,cifs,nfs4 # Reverse list net_files="" diff --git a/bootscripts/lfs/init.d/rc b/bootscripts/lfs/init.d/rc index 2bc155ed4..80469e952 100644 --- a/bootscripts/lfs/init.d/rc +++ b/bootscripts/lfs/init.d/rc @@ -18,11 +18,11 @@ print_error_msg() { log_failure_msg # $i is set when called - MSG="FAILURE:\n\nYou should not be reading this error message.\n\n" + MSG="FAILURE:\n\nYou should not be reading this error message.\n\n" MSG="${MSG}It means that an unforeseen error took place in\n" MSG="${MSG}${i},\n" MSG="${MSG}which exited with a return value of ${error_value}.\n" - + MSG="${MSG}If you're able to track this error down to a bug in one of\n" MSG="${MSG}the files provided by the ${DISTRO_MINI} book,\n" MSG="${MSG}please be so kind to inform us at ${DISTRO_CONTACT}.\n" @@ -36,7 +36,7 @@ check_script_status() { # $i is set when called if [ ! -f ${i} ]; then - log_warning_msg "${i} is not a valid symlink." + log_warning_msg "${i} is not a valid symlink." SCRIPT_STAT="1" fi @@ -102,16 +102,16 @@ previous=${PREVLEVEL} [ "${previous}" == "" ] && previous=N if [ ! -d /etc/rc.d/rc${runlevel}.d ]; then - log_info_msg "/etc/rc.d/rc${runlevel}.d does not exist.\n" + log_info_msg "/etc/rc.d/rc${runlevel}.d does not exist.\n" exit 1 fi if [ "$runlevel" == "6" -o "$runlevel" == "0" ]; then IPROMPT="no"; fi # Note: In ${LOGLEVEL:-7}, it is ':' 'dash' '7', not minus 7 -if [ "$runlevel" == "S" ]; then - [ -r /etc/sysconfig/console ] && source /etc/sysconfig/console - dmesg -n "${LOGLEVEL:-7}" +if [ "$runlevel" == "S" ]; then + [ -r /etc/sysconfig/console ] && source /etc/sysconfig/console + dmesg -n "${LOGLEVEL:-7}" fi if [ "${IPROMPT}" == "yes" -a "${runlevel}" == "S" ]; then @@ -225,10 +225,10 @@ fi # Copy the boot log on initial boot only if [ "${previous}" == "N" -a "${runlevel}" != "S" ]; then cat $BOOTLOG >> /var/log/boot.log - + # Mark the end of boot echo "--------" >> /var/log/boot.log - + # Remove the temporary file rm -f $BOOTLOG 2> /dev/null fi diff --git a/bootscripts/lfs/init.d/setclock b/bootscripts/lfs/init.d/setclock index 059ce585d..cd4f617a8 100644 --- a/bootscripts/lfs/init.d/setclock +++ b/bootscripts/lfs/init.d/setclock @@ -13,7 +13,7 @@ ######################################################################## ### BEGIN INIT INFO -# Provides: +# Provides: # Required-Start: # Should-Start: modules # Required-Stop: diff --git a/bootscripts/lfs/init.d/swap b/bootscripts/lfs/init.d/swap index 34fad3552..9747024c5 100644 --- a/bootscripts/lfs/init.d/swap +++ b/bootscripts/lfs/init.d/swap @@ -48,7 +48,7 @@ case "${1}" in ;; status) - log_success_msg "Retrieving swap status." + log_success_msg "Retrieving swap status." swapon -s ;; diff --git a/bootscripts/lfs/init.d/udev b/bootscripts/lfs/init.d/udev index 1ec053623..c74c8e19f 100644 --- a/bootscripts/lfs/init.d/udev +++ b/bootscripts/lfs/init.d/udev @@ -60,9 +60,9 @@ case "${1}" in # If any LVM based partitions are on the system, ensure they # are activated so they can be used. - if [ -x /sbin/vgchange ]; then /sbin/vgchange -a y >/dev/null; fi + if [ -x /sbin/vgchange ]; then /sbin/vgchange -a y >/dev/null; fi - log_success_msg2 + log_success_msg2 ;; *) diff --git a/bootscripts/lfs/init.d/udev_retry b/bootscripts/lfs/init.d/udev_retry index 2253a3be2..112846a03 100644 --- a/bootscripts/lfs/init.d/udev_retry +++ b/bootscripts/lfs/init.d/udev_retry @@ -7,7 +7,7 @@ # Authors : Alexander E. Patrakov # DJ Lucas - dj@linuxfromscratch.org # Update : Bruce Dubbs - bdubbs@linuxfromscratch.org -# Bryan Kadzban - +# Bryan Kadzban - # # Version : LFS 7.0 # @@ -39,7 +39,7 @@ case "${1}" in rundir=/run/udev # From Debian: "copy the rules generated before / was mounted # read-write": - + for file in ${rundir}/tmp-rules--*; do dest=${file##*tmp-rules--} [ "$dest" = '*' ] && break @@ -47,7 +47,7 @@ case "${1}" in rm -f $file done - # Re-trigger the uevents that may have failed, + # Re-trigger the uevents that may have failed, # in hope they will succeed now /bin/sed -e 's/#.*$//' /etc/sysconfig/udev_retry | /bin/grep -v '^$' | \ while read line ; do diff --git a/bootscripts/lfs/lib/services/init-functions b/bootscripts/lfs/lib/services/init-functions index 0a7ca4da1..d0c86cb03 100644 --- a/bootscripts/lfs/lib/services/init-functions +++ b/bootscripts/lfs/lib/services/init-functions @@ -1,6 +1,6 @@ #!/bin/sh ######################################################################## -# +# # Begin /lib/lsb/init-funtions # # Description : Run Level Control Functions @@ -154,13 +154,13 @@ start_daemon() retval="${?}" fi - # Return a value ONLY + # Return a value ONLY # It is the init script's (or distribution's functions) responsibilty # to log messages! case "${retval}" in 0) - # Program is already running correctly, this is a + # Program is already running correctly, this is a # successful start. return 0 ;; @@ -230,7 +230,7 @@ killproc() pidfile="${2}" shift 2 ;; - + *) program="${1}" if [ -n "${2}" ]; then @@ -243,9 +243,9 @@ killproc() # Error on additional arguments if [ -n "${3}" ]; then return 2 - else + else break - fi + fi ;; esac done @@ -321,7 +321,7 @@ killproc() if [ "${?}" -eq "0" ]; then # Signal is used to terminate the program - # Account for empty pidlist (pid file still exists and no + # Account for empty pidlist (pid file still exists and no # signal was given) if [ "${pidlist}" != "" ]; then @@ -336,7 +336,7 @@ killproc() else kill "${signal}" "${pid}" 2> /dev/null - # Wait up to ${delay}/10 seconds to for "${pid}" to + # Wait up to ${delay}/10 seconds to for "${pid}" to # terminate in 10ths of a second while [ "${delay}" -ne "0" ]; do @@ -433,7 +433,7 @@ pidofproc() # Get the program's basename prefix=`echo "${program}" | sed 's/[^/]*$//'` - if [ -z "${prefix}" ]; then + if [ -z "${prefix}" ]; then progname="${program}" else progname=`echo "${program}" | sed "s@${prefix}@@"` @@ -583,7 +583,7 @@ log_success_msg() timespec /bin/echo -e "${STAMP} ${logmessage} OK" >> ${BOOTLOG} - + return 0 } @@ -593,7 +593,7 @@ log_success_msg2() /bin/echo -e "${CURS_ZERO}${SUCCESS_PREFIX}${SET_COL}${SUCCESS_SUFFIX}" echo " OK" >> ${BOOTLOG} - + return 0 } @@ -618,7 +618,7 @@ log_failure_msg() timespec logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'` /bin/echo -e "${STAMP} ${logmessage} FAIL" >> ${BOOTLOG} - + return 0 } @@ -628,7 +628,7 @@ log_failure_msg2() /bin/echo -e "${CURS_ZERO}${FAILURE_PREFIX}${SET_COL}${FAILURE_SUFFIX}" echo "FAIL" >> ${BOOTLOG} - + return 0 } @@ -650,7 +650,7 @@ log_warning_msg() logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'` timespec /bin/echo -e "${STAMP} ${logmessage} WARN" >> ${BOOTLOG} - + return 0 } @@ -662,7 +662,7 @@ log_skip_msg() # Strip non-printable characters from log file logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'` /bin/echo "SKIP" >> ${BOOTLOG} - + return 0 } @@ -683,7 +683,7 @@ log_info_msg() logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'` timespec /bin/echo -n -e "${STAMP} ${logmessage}" >> ${BOOTLOG} - + return 0 } @@ -694,7 +694,7 @@ log_info_msg2() # Strip non-printable characters from log file logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'` /bin/echo -n -e "${logmessage}" >> ${BOOTLOG} - + return 0 } diff --git a/bootscripts/lfs/lib/services/ipv4-static-route b/bootscripts/lfs/lib/services/ipv4-static-route index 293ca44a5..4db3a5d19 100755 --- a/bootscripts/lfs/lib/services/ipv4-static-route +++ b/bootscripts/lfs/lib/services/ipv4-static-route @@ -56,10 +56,10 @@ if [ -n "${need_ip}" ]; then fi if [ -z "${PREFIX}" ]; then - log_failure_msg "PREFIX variable missing from ${IFCONFIG}, cannot continue." + log_failure_msg "PREFIX variable missing from ${IFCONFIG}, cannot continue." exit 1 fi - + args="${args} ${IP}/${PREFIX}" desc="${desc}${IP}/${PREFIX}" fi @@ -82,13 +82,13 @@ case "${2}" in ip route add ${args} dev ${1} evaluate_retval ;; - + down) log_info_msg "Removing '${desc}' route from the ${1} interface..." ip route del ${args} dev ${1} evaluate_retval ;; - + *) echo "Usage: ${0} [interface] {up|down}" exit 1 diff --git a/bootscripts/lfs/sbin/ifdown b/bootscripts/lfs/sbin/ifdown index e875be905..05d7b4188 100755 --- a/bootscripts/lfs/sbin/ifdown +++ b/bootscripts/lfs/sbin/ifdown @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash ######################################################################## # Begin /sbin/ifdown # @@ -30,7 +30,7 @@ while [ $# -gt 0 ]; do -*) echo "ifup: ${1}: invalid option" >&2 echo "${USAGE}" >& 2 exit 2 ;; - + *) break ;; esac done @@ -53,7 +53,7 @@ file=/etc/sysconfig/ifconfig.${1} # Skip backup files [ "${file}" = "${file%""~""}" ] || exit 0 -. /lib/lsb/init-functions +. /lib/lsb/init-functions if [ ! -r "${file}" ]; then log_warning_msg "${file} is missing or cannot be accessed." diff --git a/bootscripts/lfs/sbin/ifup b/bootscripts/lfs/sbin/ifup index 5a4945a43..4c70810cd 100755 --- a/bootscripts/lfs/sbin/ifup +++ b/bootscripts/lfs/sbin/ifup @@ -48,11 +48,11 @@ while [ $# -gt 0 ]; do --help | -h) help="y"; break ;; --version | -V) echo "${VERSTR}"; exit 0 ;; - + -*) echo "ifup: ${1}: invalid option" >&2 echo "${USAGE}" >& 2 exit 2 ;; - + *) break ;; esac done @@ -102,7 +102,7 @@ fi for S in ${SERVICE}; do if [ ! -x "/lib/services/${S}" ]; then - MSG="\nUnable to process ${file}. Either " + MSG="\nUnable to process ${file}. Either " MSG="${MSG}the SERVICE '${S} was not present " MSG="${MSG}or cannot be executed." log_failure_msg "$MSG" @@ -113,7 +113,7 @@ done if [ "${SERVICE}" = "wpa" ]; then log_success_msg; fi # Create/configure the interface -for S in ${SERVICE}; do +for S in ${SERVICE}; do IFCONFIG=${file} /lib/services/${S} ${IFACE} up done @@ -128,13 +128,13 @@ for I in $INTERFACE_COMPONENTS; do up $I; done # Set MTU if requested. Check if MTU has a "good" value. if test -n "${MTU}"; then if [[ ${MTU} =~ ^[0-9]+$ ]] && [[ $MTU -ge 68 ]] ; then - for I in $IFACE $INTERFACE_COMPONENTS; do - ip link set dev $I mtu $MTU; + for I in $IFACE $INTERFACE_COMPONENTS; do + ip link set dev $I mtu $MTU; done else log_info_msg2 "Invalid MTU $MTU" fi -fi +fi # Set the route default gateway if requested if [ -n "${GATEWAY}" ]; then diff --git a/bootscripts/lfs/sbin/ifup.8 b/bootscripts/lfs/sbin/ifup.8 index e0ca9db37..2fb7873ec 100644 --- a/bootscripts/lfs/sbin/ifup.8 +++ b/bootscripts/lfs/sbin/ifup.8 @@ -14,9 +14,9 @@ SYNOPSIS ifdown -V|--version DESCRIPTION - The ifup and ifdown commands may be used to configure - (or, respectively, deconfigure) a network interface based - on interface definitions in the file + The ifup and ifdown commands may be used to configure + (or, respectively, deconfigure) a network interface based + on interface definitions in the file /etc/sysconfig/ifconfig.IFACE. OPTIONS @@ -30,7 +30,7 @@ OPTIONS EXAMPLES ifup eth0 - Bring up the interface defined in the file + Bring up the interface defined in the file /etc/sysconfig/ifconfig.eth0 ONBOOT=no @@ -49,21 +49,21 @@ EXAMPLES IFACE=eth0 LABEL=eth0:2 SERVICE=dhcpcd - + DHCP_START="--waitip" DHCP_STOP="-k" - + # Set PRINTIP="yes" to have the script print the DHCP IP address PRINTIP="yes" - + # Set PRINTALL="yes" to print the DHCP assigned values for - # IP, SM, DG, and 1st NS. + # IP, SM, DG, and 1st NS. PRINTALL="no" ifup br0 - Bring up the interface defined in the file + Bring up the interface defined in the file /etc/sysconfig/ifconfig.br0 - + ONBOOT=yes IFACE=br0 SERVICE="bridge ipv4-static" @@ -77,65 +77,65 @@ EXAMPLES NOTES The program does not configure network interfaces direct- - ly. It runs scripts defined by the SERVICE variable in + ly. It runs scripts defined by the SERVICE variable in the network configuration file. The configuration files must have the following environ- ment variables set: - IFACE - The interface to configure, e.g. eth0. It must + IFACE - The interface to configure, e.g. eth0. It must be available in /sys/class/net. SERVICE - The service script to run to bring up the inter- - face. Standard services are ipv4-static and + face. Standard services are ipv4-static and ipv4-static-route. Other services such as dhcp or bridge may be installed. This value may be a list of services when the interface is a compound device such as a bridge. - ONBOOT - If set to 'yes', the specified interface is + ONBOOT - If set to 'yes', the specified interface is configured by the netowrk boot script. GATEWAY - The default IP address to use for routing if - the destination IP address is not in a static - route or on a local network, e.g., 192.168.1.1. - For secondary IP addresses on an interface, this + the destination IP address is not in a static + route or on a local network, e.g., 192.168.1.1. + For secondary IP addresses on an interface, this parameter should not be specified. If the service is ipv4-static-route, this parameter must NOT be set. STATIC_GATEWAY - The default IP address to use for routing - when setting a static routing address. + when setting a static routing address. INTERFACE_COMPONENTS - A list of component interfaces - only needed for a compound device such as a bridge. - This list is normally a single value, e.g. eth0, + only needed for a compound device such as a bridge. + This list is normally a single value, e.g. eth0, for use with a virtual host such as kvm. Other paramters that are service specific include: ipv4-static - IP - The IP address of the interface, + IP - The IP address of the interface, e.g. 192.168.1.2. PREFIX - The number of bits that specify the network number of the interface. The default, if not specified, is 24. - - LABEL - The label to be assigned to the interface. + + LABEL - The label to be assigned to the interface. This is normally specified for assigning additional IP addresses to a network device. Example: eth0:2 (optional) - - BROADCAST - The brodcast address for this interface, - e.g 192.168.1.255. If not specified, + + BROADCAST - The brodcast address for this interface, + e.g 192.168.1.255. If not specified, the broadcast address will be calculated from the IP and PREFIX. ipv4-static-route - TYPE - The type of route, typically 'default', + TYPE - The type of route, typically 'default', 'network', 'or host'. IP - The IP address for a network or host, if the @@ -145,7 +145,7 @@ NOTES STATIC_GATEWAY - The IP address for a network route. - SOURCE - The source IP address to prefer when sending + SOURCE - The source IP address to prefer when sending to the destinations covered by the specified route. (optional) @@ -154,7 +154,7 @@ NOTES DHCP_START - Optional parameters to pass to the dhcp client at startup. - DHCP_STOP - Optional paremeters to pass to the dhcp client + DHCP_STOP - Optional paremeters to pass to the dhcp client at shutdown. PRINTIP - Flag to print the dhcp address to stdout @@ -164,18 +164,18 @@ NOTES bridge IP_FORWARD - An optional flag to enable the system to forward - inbound IP packets received by one interface to - another outbound interface. + inbound IP packets received by one interface to + another outbound interface. STP - Set bridge spanning tree protocol. Default is no. FILES /etc/sysconfig/ifconfig.* - definitions of network interfaces + definitions of network interfaces AUTHORS The ifup/ifdown suite was written by Nathan Coulson - <nathan@linuxfromscratch.org> and Kevin P. Fleming + <nathan@linuxfromscratch.org> and Kevin P. Fleming <kpfleming@linuxfromscratch.org> and updated by Bruce Dubbs <bdubbs@linuxfromscratch>. diff --git a/bootscripts/lfs/sysconfig/createfiles b/bootscripts/lfs/sysconfig/createfiles index 9706346df..3d8587439 100644 --- a/bootscripts/lfs/sysconfig/createfiles +++ b/bootscripts/lfs/sysconfig/createfiles @@ -11,7 +11,7 @@ # if type is equal to "file" or "dir" # <filename> <type> <permissions> <user> <group> # if type is equal to "dev" -# <filename> <type> <permissions> <user> <group> <devtype> +# <filename> <type> <permissions> <user> <group> <devtype> # <major> <minor> # # <filename> is the name of the file which is to be created @@ -22,9 +22,9 @@ # <devtype> is either block, char or pipe # block creates a block device # char creates a character deivce -# pipe creates a pipe, this will ignore the <major> and +# pipe creates a pipe, this will ignore the <major> and # <minor> fields -# <major> and <minor> are the major and minor numbers used for +# <major> and <minor> are the major and minor numbers used for # the device. ######################################################################## |