Changeset a44ae577
- Timestamp:
- 09/07/2021 09:01:23 PM (21 months ago)
- Branches:
- 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, arm, bdubbs/gcc13, multilib, s6-init, trunk, xry111/arm64, xry111/clfs-ng, xry111/glibc-2.37, xry111/kcfg-revise, xry111/lfs-next, xry111/pip3, xry111/queue-11.3, xry111/rust-wip-20221008
- Children:
- 408fb782
- Parents:
- e7fb2ca
- Location:
- bootscripts
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
bootscripts/ChangeLog
re7fb2ca ra44ae577 7 7 8 8 2021-04-28 Bruce Dubbs <bdubbs@linuxfromscratch.org> 9 * Make check_signal more robust. 9 * Make check_signal more robust. 10 10 * Use a better methog for killproc to remove a dead pid file. 11 11 * Clarify what signals killproc accepts. … … 85 85 * Remove local attribue of some variables for Bourne 86 86 shell compatability 87 * Specify /bin/echo in commands with -e switch for 87 * Specify /bin/echo in commands with -e switch for 88 88 Bourne shell compatability 89 89 … … 122 122 ** Updated ifup.8 to reflect current usage 123 123 ** ifup 124 *** Move interface up logic to after service scripts. Eliminates the 124 *** Move interface up logic to after service scripts. Eliminates the 125 125 need for the LINK_CHECK variable. 126 126 *** Sets the GATEWAY if the variable is set … … 168 168 * Create convenience symlink /etc/init.d->/etc/rc.d/init.d. 169 169 * Add help and man pages to upup/ifdown. 170 * Append /run/var/bootlog to /var/log/boot.log at the end of 170 * Append /run/var/bootlog to /var/log/boot.log at the end of 171 171 the boot sequence. 172 172 * Add capabiltiy to step through the boot scripts at boot time 173 * Optionally allow environment variables in sysconfig directory's 173 * Optionally allow environment variables in sysconfig directory's 174 174 console, network, and clock files to be placed in rc.site. 175 175 * Add an optional FASTBOOT parameter to set /fastboot when rebooting. … … 184 184 ** Add /etc/sysconfig/init_params for adding environmental parameters 185 185 to all functions used in bootscripts 186 ** Move network configuration to /etc/sysconfig/ifconfig.*. The 187 ifconfig files can have any extension. Use IFACE parameter to 186 ** Move network configuration to /etc/sysconfig/ifconfig.*. The 187 ifconfig files can have any extension. Use IFACE parameter to 188 188 specify the target network interface within the configuration file. 189 ** Adds an optional parameter, SKIPTMPCLEAN, to skip the removal of 190 files in /tmp at bootup. Specify the variable in 189 ** Adds an optional parameter, SKIPTMPCLEAN, to skip the removal of 190 files in /tmp at bootup. Specify the variable in 191 191 /etc/sysconfig/init_params. 192 192 … … 224 224 2009-01-02 Bruce Dubbs <bdubbs@linuxfromscratch.org> 225 225 * lfs/init.d/functions: 226 * lfs/sysconfig/network-devices/ifup: 227 Updated line widths to accommodate pdf generation in both the above 226 * lfs/sysconfig/network-devices/ifup: 227 Updated line widths to accommodate pdf generation in both the above 228 228 files. 229 229 … … 342 342 n/a - June 2, 2006 343 343 * Removed console config file and makefile targets. 344 * Removed references to /dev/bug and bugreport in udev and344 * Removed references to /dev/bug and bugreport in udev and 345 345 udev_retry bootscripts. (DJ Lucas) 346 346 … … 351 351 352 352 n/a - April 15, 2006 353 * Cleaned up contrib directory. Removed: contrib/init.d, 354 contrib/enhanced, contrib/livecd, contrib/hotplug, and raq2 353 * Cleaned up contrib directory. Removed: contrib/init.d, 354 contrib/enhanced, contrib/livecd, contrib/hotplug, and raq2 355 355 patch. (DJ Lucas) 356 356 357 357 n/a - April 14, 2006 358 358 * Merged changes from udev_update branch (DJ Lucas) 359 * Replaced a return with an exit and reversed comment changes in 359 * Replaced a return with an exit and reversed comment changes in 360 360 udev bootscript. (Dan Nicholson) 361 361 * Replaced walk_sysfs function in udev bootscript with new udevtrigger … … 370 370 371 371 n/a - March 10, 2006 372 * Moved src argument to ipv4-static-route service script and 372 * Moved src argument to ipv4-static-route service script and 373 373 removed from ipv4-static service script. (DJ Lucas) 374 374 … … 389 389 * Made above killproc/print_status changes in enhanced 390 390 bootscripts. 391 * Made logger service configurable in enhanced 391 * Made logger service configurable in enhanced 392 392 bootscripts. (DJ Lucas) 393 393 394 394 n/a - August 14, 2005 395 * Added -s flag to pidofproc() for backwards 395 * Added -s flag to pidofproc() for backwards 396 396 compatibility (DJ Lucas) 397 * Fixed erronous values returned by pidofproc() which 397 * Fixed erronous values returned by pidofproc() which 398 398 broke the functionality of statusproc (DJ Lucas) 399 399 … … 403 403 404 404 n/a - June 26, 2005 405 * Removed consolelog script from contrib 406 * Updated interactive rc script in contrib and added 405 * Removed consolelog script from contrib 406 * Updated interactive rc script in contrib and added 407 407 README.rc-Interactive, added install target to the 408 408 Makefile. (DJ Lucas) … … 600 600 n/a - September 21, 2004 601 601 * boot_mesg has been enhanced. Subsequent calls will overwrite 602 previous text, and it will wrap text basedupon the variable ${WCOL}. 602 previous text, and it will wrap text basedupon the variable ${WCOL}. 603 603 (James Robertson) 604 604 * Fixed mtu optional service typo (Kevin P Fleming) … … 609 609 610 610 n/a - September 15, 2004 611 * Added blue bracket, from dj's 3.0-pre1 bootscript package 611 * Added blue bracket, from dj's 3.0-pre1 bootscript package 612 612 [echo_failure, echo_warning, and echo_ok] 613 613 * Added a new function called boot_mesg, meant to replace the echo … … 633 633 634 634 n/a - August 4, 2004 635 * Added MODE, DIRMODE, and CONFMODE variables to the makefile 635 * Added MODE, DIRMODE, and CONFMODE variables to the makefile 636 636 to allow permissions to be set at install. (DJ) 637 637 638 638 n/a - July 31, 2004 639 640 639 * Moved PIDFILE check to getpids and removed arguments from 641 640 killproc and reloadproc. Signals are now set at beginning of … … 646 645 n/a - July 21, 2004 647 646 648 * Committed DJ Lucas's patch for the killproc function. It no 647 * Committed DJ Lucas's patch for the killproc function. It no 649 648 longer requires arguments if PIDFILE is set 650 649 * added --backup to all sysconfig configuration files, so they are not … … 979 978 * Changed service script install targets to use 980 979 create-service-dir 981 * Added check for dhcpcd service script for stale pid file 980 * Added check for dhcpcd service script for stale pid file 982 981 Suggested by Jeremy 983 982 * Added ifconfig to ipx service script for hosting device not up -
bootscripts/Makefile
re7fb2ca ra44ae577 30 30 ln -sfn rc.d/init.d ${ETCDIR}/init.d 31 31 32 files: create-dirs 32 files: create-dirs 33 33 install -m ${MODE} lfs/init.d/checkfs ${ETCDIR}/rc.d/init.d/ 34 34 install -m ${MODE} lfs/init.d/cleanfs ${ETCDIR}/rc.d/init.d/ … … 127 127 rm -rf ${DESTDIR}/lib/services ${DESTDIR}/lib/lsb ${ETCDIR}/rc.d ${ETCDIR}/init.d \ 128 128 ${SBIN}/ifup ${SBIN}/ifdown ${MAN8}/ifup.8 ${MAN8}/ifdown.8 \ 129 ${ETCDIR}/sysconfig/rc 129 ${ETCDIR}/sysconfig/rc 130 130 131 131 .PHONY: all create-dirs install files links rcS rc0 rc1 rc2 rc3 rc4 rc5 rc6 uninstall -
bootscripts/README
re7fb2ca ra44ae577 49 49 - SKIPTMPCLEAN: skips cleaning of /tmp directory 50 50 51 /etc/sysconfig/createfiles 51 /etc/sysconfig/createfiles 52 52 Each line is parsed, using space as a deliminator. 53 53 [NAME] [TYPE] [PERMISSIONS] [USER] [GROUP] -
bootscripts/lfs/init.d/checkfs
re7fb2ca ra44ae577 62 62 log_failure_msg "${msg}" 63 63 64 log_info_msg "Press Enter to continue..." 64 log_info_msg "Press Enter to continue..." 65 65 wait_for_user 66 66 /etc/rc.d/init.d/halt stop … … 70 70 71 71 if [ -f /forcefsck ]; then 72 msg="/forcefsck found, forcing file" 72 msg="/forcefsck found, forcing file" 73 73 msg="${msg} system checks as requested." 74 74 log_success_msg "$msg" … … 109 109 log_failure_msg "$msg" 110 110 111 log_info_msg "Press Enter to continue..." 111 log_info_msg "Press Enter to continue..." 112 112 wait_for_user 113 113 reboot -f … … 126 126 log_failure_msg "$msg" 127 127 128 log_info_msg "Press Enter to continue..." 128 log_info_msg "Press Enter to continue..." 129 129 wait_for_user 130 130 /etc/rc.d/init.d/halt stop -
bootscripts/lfs/init.d/cleanfs
re7fb2ca ra44ae577 23 23 # Short-Description: Cleans temporary directories early in the boot process. 24 24 # Description: Cleans temporary directories /run, /var/lock, and 25 # optionally, /tmp. cleanfs also creates /run/utmp 25 # optionally, /tmp. cleanfs also creates /run/utmp 26 26 # and any files defined in /etc/sysconfig/createfiles. 27 27 # X-LFS-Provided-By: LFS … … 31 31 32 32 # Function to create files/directory on boot. 33 create_files() 33 create_files() 34 34 { 35 35 # Input to file descriptor 9 and output to stdin (redirection) … … 64 64 mknod "${name}" p 65 65 ;; 66 *) 67 log_warning_msg "\nUnknown device type: ${dtype}" 66 *) 67 log_warning_msg "\nUnknown device type: ${dtype}" 68 68 ;; 69 69 esac 70 70 ;; 71 71 *) 72 log_warning_msg "\nUnknown type: ${type}" 72 log_warning_msg "\nUnknown type: ${type}" 73 73 continue 74 74 ;; … … 88 88 case "${1}" in 89 89 start) 90 log_info_msg "Cleaning file systems:" 90 log_info_msg "Cleaning file systems:" 91 91 92 92 if [ "${SKIPTMPCLEAN}" = "" ]; then 93 log_info_msg2 " /tmp" 93 log_info_msg2 " /tmp" 94 94 cd /tmp && 95 95 find . -xdev -mindepth 1 ! -name lost+found -delete || failed=1 -
bootscripts/lfs/init.d/console
re7fb2ca ra44ae577 33 33 [ -r /etc/sysconfig/console ] && . /etc/sysconfig/console 34 34 35 is_true() 35 is_true() 36 36 { 37 37 [ "$1" = "1" ] || [ "$1" = "yes" ] || [ "$1" = "true" ] … … 44 44 # See if we need to do anything 45 45 if [ -z "${KEYMAP}" ] && [ -z "${KEYMAP_CORRECTIONS}" ] && 46 [ -z "${FONT}" ] && [ -z "${LEGACY_CHARSET}" ] && 47 ! is_true "${UNICODE}"; then 46 [ -z "${FONT}" ] && [ -z "${LEGACY_CHARSET}" ] && 47 ! is_true "${UNICODE}"; then 48 48 exit 0 49 49 fi … … 86 86 loadkeys ${KEYMAP} >/dev/null 2>&1 || 87 87 failed=1 88 88 89 89 [ -z "${KEYMAP_CORRECTIONS}" ] || 90 90 loadkeys ${KEYMAP_CORRECTIONS} >/dev/null 2>&1 || … … 98 98 # If any of the commands above failed, the trap at the 99 99 # top would set $failed to 1 100 ( exit $failed ) 100 ( exit $failed ) 101 101 evaluate_retval 102 102 103 103 exit $failed 104 ;; 104 ;; 105 105 106 *) 106 *) 107 107 echo "Usage: ${0} {start}" 108 exit 1 109 ;; 108 exit 1 109 ;; 110 110 esac 111 111 -
bootscripts/lfs/init.d/modules
re7fb2ca ra44ae577 38 38 egrep -qv '^($|#)' /etc/sysconfig/modules || exit 0 39 39 40 log_info_msg "Loading modules:" 40 log_info_msg "Loading modules:" 41 41 42 42 # Only try to load modules if the user has actually given us … … 55 55 # Print the module name if successful, otherwise take note. 56 56 if [ $? -eq 0 ]; then 57 log_info_msg2 " ${module}" 57 log_info_msg2 " ${module}" 58 58 else 59 59 failedmod="${failedmod} ${module}" … … 64 64 log_success_msg2 65 65 66 # Print a failure message with a list of any modules that 66 # Print a failure message with a list of any modules that 67 67 # may have failed to load. 68 68 if [ -n "${failedmod}" ]; then 69 log_failure_msg "Failed to load modules:${failedmod}" 69 log_failure_msg "Failed to load modules:${failedmod}" 70 70 exit 1 71 71 fi -
bootscripts/lfs/init.d/mountvirtfs
re7fb2ca ra44ae577 40 40 chmod 1777 /run/shm /run/lock 41 41 42 log_info_msg "Mounting virtual file systems: ${INFO}/run" 42 log_info_msg "Mounting virtual file systems: ${INFO}/run" 43 43 44 44 if ! mountpoint /proc >/dev/null; then … … 48 48 49 49 if ! mountpoint /sys >/dev/null; then 50 log_info_msg2 " ${INFO}/sys" 50 log_info_msg2 " ${INFO}/sys" 51 51 mount -o nosuid,noexec,nodev /sys || failed=1 52 52 fi 53 53 54 54 if ! mountpoint /dev >/dev/null; then 55 log_info_msg2 " ${INFO}/dev" 55 log_info_msg2 " ${INFO}/dev" 56 56 mount -o mode=0755,nosuid /dev || failed=1 57 57 fi 58 58 59 59 ln -sfn /run/shm /dev/shm 60 60 61 61 (exit ${failed}) 62 62 evaluate_retval -
bootscripts/lfs/init.d/network
re7fb2ca ra44ae577 44 44 stop) 45 45 # Unmount any network mounted file systems 46 umount --all --force --types nfs,cifs,nfs4 46 umount --all --force --types nfs,cifs,nfs4 47 47 48 48 # Reverse list -
bootscripts/lfs/init.d/rc
re7fb2ca ra44ae577 19 19 log_failure_msg 20 20 # $i is set when called 21 MSG="FAILURE:\n\nYou should not be reading this error message.\n\n" 21 MSG="FAILURE:\n\nYou should not be reading this error message.\n\n" 22 22 MSG="${MSG}It means that an unforeseen error took place in\n" 23 23 MSG="${MSG}${i},\n" 24 24 MSG="${MSG}which exited with a return value of ${error_value}.\n" 25 25 26 26 MSG="${MSG}If you're able to track this error down to a bug in one of\n" 27 27 MSG="${MSG}the files provided by the ${DISTRO_MINI} book,\n" … … 37 37 # $i is set when called 38 38 if [ ! -f ${i} ]; then 39 log_warning_msg "${i} is not a valid symlink." 39 log_warning_msg "${i} is not a valid symlink." 40 40 SCRIPT_STAT="1" 41 41 fi … … 103 103 104 104 if [ ! -d /etc/rc.d/rc${runlevel}.d ]; then 105 log_info_msg "/etc/rc.d/rc${runlevel}.d does not exist.\n" 105 log_info_msg "/etc/rc.d/rc${runlevel}.d does not exist.\n" 106 106 exit 1 107 107 fi … … 110 110 111 111 # Note: In ${LOGLEVEL:-7}, it is ':' 'dash' '7', not minus 7 112 if [ "$runlevel" == "S" ]; then 113 [ -r /etc/sysconfig/console ] && source /etc/sysconfig/console 114 dmesg -n "${LOGLEVEL:-7}" 112 if [ "$runlevel" == "S" ]; then 113 [ -r /etc/sysconfig/console ] && source /etc/sysconfig/console 114 dmesg -n "${LOGLEVEL:-7}" 115 115 fi 116 116 … … 226 226 if [ "${previous}" == "N" -a "${runlevel}" != "S" ]; then 227 227 cat $BOOTLOG >> /var/log/boot.log 228 228 229 229 # Mark the end of boot 230 230 echo "--------" >> /var/log/boot.log 231 231 232 232 # Remove the temporary file 233 233 rm -f $BOOTLOG 2> /dev/null -
bootscripts/lfs/init.d/setclock
re7fb2ca ra44ae577 14 14 15 15 ### BEGIN INIT INFO 16 # Provides: 16 # Provides: 17 17 # Required-Start: 18 18 # Should-Start: modules -
bootscripts/lfs/init.d/swap
re7fb2ca ra44ae577 49 49 50 50 status) 51 log_success_msg "Retrieving swap status." 51 log_success_msg "Retrieving swap status." 52 52 swapon -s 53 53 ;; -
bootscripts/lfs/init.d/udev
re7fb2ca ra44ae577 61 61 # If any LVM based partitions are on the system, ensure they 62 62 # are activated so they can be used. 63 if [ -x /sbin/vgchange ]; then /sbin/vgchange -a y >/dev/null; fi 63 if [ -x /sbin/vgchange ]; then /sbin/vgchange -a y >/dev/null; fi 64 64 65 log_success_msg2 65 log_success_msg2 66 66 ;; 67 67 -
bootscripts/lfs/init.d/udev_retry
re7fb2ca ra44ae577 8 8 # DJ Lucas - dj@linuxfromscratch.org 9 9 # Update : Bruce Dubbs - bdubbs@linuxfromscratch.org 10 # Bryan Kadzban - 10 # Bryan Kadzban - 11 11 # 12 12 # Version : LFS 7.0 … … 40 40 # From Debian: "copy the rules generated before / was mounted 41 41 # read-write": 42 42 43 43 for file in ${rundir}/tmp-rules--*; do 44 44 dest=${file##*tmp-rules--} … … 48 48 done 49 49 50 # Re-trigger the uevents that may have failed, 50 # Re-trigger the uevents that may have failed, 51 51 # in hope they will succeed now 52 52 /bin/sed -e 's/#.*$//' /etc/sysconfig/udev_retry | /bin/grep -v '^$' | \ -
bootscripts/lfs/lib/services/init-functions
re7fb2ca ra44ae577 1 1 #!/bin/sh 2 2 ######################################################################## 3 # 3 # 4 4 # Begin /lib/lsb/init-funtions 5 5 # … … 155 155 fi 156 156 157 # Return a value ONLY 157 # Return a value ONLY 158 158 # It is the init script's (or distribution's functions) responsibilty 159 159 # to log messages! … … 161 161 162 162 0) 163 # Program is already running correctly, this is a 163 # Program is already running correctly, this is a 164 164 # successful start. 165 165 return 0 … … 231 231 shift 2 232 232 ;; 233 233 234 234 *) 235 235 program="${1}" … … 244 244 if [ -n "${3}" ]; then 245 245 return 2 246 else 246 else 247 247 break 248 fi 248 fi 249 249 ;; 250 250 esac … … 322 322 if [ "${?}" -eq "0" ]; then # Signal is used to terminate the program 323 323 324 # Account for empty pidlist (pid file still exists and no 324 # Account for empty pidlist (pid file still exists and no 325 325 # signal was given) 326 326 if [ "${pidlist}" != "" ]; then … … 337 337 kill "${signal}" "${pid}" 2> /dev/null 338 338 339 # Wait up to ${delay}/10 seconds to for "${pid}" to 339 # Wait up to ${delay}/10 seconds to for "${pid}" to 340 340 # terminate in 10ths of a second 341 341 … … 434 434 prefix=`echo "${program}" | sed 's/[^/]*$//'` 435 435 436 if [ -z "${prefix}" ]; then 436 if [ -z "${prefix}" ]; then 437 437 progname="${program}" 438 438 else … … 584 584 timespec 585 585 /bin/echo -e "${STAMP} ${logmessage} OK" >> ${BOOTLOG} 586 586 587 587 return 0 588 588 } … … 594 594 595 595 echo " OK" >> ${BOOTLOG} 596 596 597 597 return 0 598 598 } … … 619 619 logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'` 620 620 /bin/echo -e "${STAMP} ${logmessage} FAIL" >> ${BOOTLOG} 621 621 622 622 return 0 623 623 } … … 629 629 630 630 echo "FAIL" >> ${BOOTLOG} 631 631 632 632 return 0 633 633 } … … 651 651 timespec 652 652 /bin/echo -e "${STAMP} ${logmessage} WARN" >> ${BOOTLOG} 653 653 654 654 return 0 655 655 } … … 663 663 logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'` 664 664 /bin/echo "SKIP" >> ${BOOTLOG} 665 665 666 666 return 0 667 667 } … … 684 684 timespec 685 685 /bin/echo -n -e "${STAMP} ${logmessage}" >> ${BOOTLOG} 686 686 687 687 return 0 688 688 } … … 695 695 logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'` 696 696 /bin/echo -n -e "${logmessage}" >> ${BOOTLOG} 697 697 698 698 return 0 699 699 } -
bootscripts/lfs/lib/services/ipv4-static-route
re7fb2ca ra44ae577 57 57 58 58 if [ -z "${PREFIX}" ]; then 59 log_failure_msg "PREFIX variable missing from ${IFCONFIG}, cannot continue." 59 log_failure_msg "PREFIX variable missing from ${IFCONFIG}, cannot continue." 60 60 exit 1 61 61 fi 62 62 63 63 args="${args} ${IP}/${PREFIX}" 64 64 desc="${desc}${IP}/${PREFIX}" … … 83 83 evaluate_retval 84 84 ;; 85 85 86 86 down) 87 87 log_info_msg "Removing '${desc}' route from the ${1} interface..." … … 89 89 evaluate_retval 90 90 ;; 91 91 92 92 *) 93 93 echo "Usage: ${0} [interface] {up|down}" -
bootscripts/lfs/sbin/ifdown
re7fb2ca ra44ae577 1 #!/bin/bash 1 #!/bin/bash 2 2 ######################################################################## 3 3 # Begin /sbin/ifdown … … 31 31 echo "${USAGE}" >& 2 32 32 exit 2 ;; 33 33 34 34 *) break ;; 35 35 esac … … 54 54 [ "${file}" = "${file%""~""}" ] || exit 0 55 55 56 . /lib/lsb/init-functions 56 . /lib/lsb/init-functions 57 57 58 58 if [ ! -r "${file}" ]; then -
bootscripts/lfs/sbin/ifup
re7fb2ca ra44ae577 49 49 50 50 --version | -V) echo "${VERSTR}"; exit 0 ;; 51 51 52 52 -*) echo "ifup: ${1}: invalid option" >&2 53 53 echo "${USAGE}" >& 2 54 54 exit 2 ;; 55 55 56 56 *) break ;; 57 57 esac … … 103 103 for S in ${SERVICE}; do 104 104 if [ ! -x "/lib/services/${S}" ]; then 105 MSG="\nUnable to process ${file}. Either " 105 MSG="\nUnable to process ${file}. Either " 106 106 MSG="${MSG}the SERVICE '${S} was not present " 107 107 MSG="${MSG}or cannot be executed." … … 114 114 115 115 # Create/configure the interface 116 for S in ${SERVICE}; do 116 for S in ${SERVICE}; do 117 117 IFCONFIG=${file} /lib/services/${S} ${IFACE} up 118 118 done … … 129 129 if test -n "${MTU}"; then 130 130 if [[ ${MTU} =~ ^[0-9]+$ ]] && [[ $MTU -ge 68 ]] ; then 131 for I in $IFACE $INTERFACE_COMPONENTS; do 132 ip link set dev $I mtu $MTU; 131 for I in $IFACE $INTERFACE_COMPONENTS; do 132 ip link set dev $I mtu $MTU; 133 133 done 134 134 else 135 135 log_info_msg2 "Invalid MTU $MTU" 136 136 fi 137 fi 137 fi 138 138 139 139 # Set the route default gateway if requested -
bootscripts/lfs/sbin/ifup.8
re7fb2ca ra44ae577 15 15 16 16 DESCRIPTION 17 The ifup and ifdown commands may be used to configure 18 (or, respectively, deconfigure) a network interface based 19 on interface definitions in the file 17 The ifup and ifdown commands may be used to configure 18 (or, respectively, deconfigure) a network interface based 19 on interface definitions in the file 20 20 /etc/sysconfig/ifconfig.IFACE. 21 21 … … 31 31 EXAMPLES 32 32 ifup eth0 33 Bring up the interface defined in the file 33 Bring up the interface defined in the file 34 34 /etc/sysconfig/ifconfig.eth0 35 35 … … 50 50 LABEL=eth0:2 51 51 SERVICE=dhcpcd 52 52 53 53 DHCP_START="--waitip" 54 54 DHCP_STOP="-k" 55 55 56 56 # Set PRINTIP="yes" to have the script print the DHCP IP address 57 57 PRINTIP="yes" 58 58 59 59 # Set PRINTALL="yes" to print the DHCP assigned values for 60 # IP, SM, DG, and 1st NS. 60 # IP, SM, DG, and 1st NS. 61 61 PRINTALL="no" 62 62 63 63 ifup br0 64 Bring up the interface defined in the file 64 Bring up the interface defined in the file 65 65 /etc/sysconfig/ifconfig.br0 66 66 67 67 ONBOOT=yes 68 68 IFACE=br0 … … 78 78 NOTES 79 79 The program does not configure network interfaces direct- 80 ly. It runs scripts defined by the SERVICE variable in 80 ly. It runs scripts defined by the SERVICE variable in 81 81 the network configuration file. 82 82 … … 84 84 ment variables set: 85 85 86 IFACE - The interface to configure, e.g. eth0. It must 86 IFACE - The interface to configure, e.g. eth0. It must 87 87 be available in /sys/class/net. 88 88 89 89 SERVICE - The service script to run to bring up the inter- 90 face. Standard services are ipv4-static and 90 face. Standard services are ipv4-static and 91 91 ipv4-static-route. Other services such as dhcp 92 92 or bridge may be installed. This value may … … 94 94 compound device such as a bridge. 95 95 96 ONBOOT - If set to 'yes', the specified interface is 96 ONBOOT - If set to 'yes', the specified interface is 97 97 configured by the netowrk boot script. 98 98 99 99 GATEWAY - The default IP address to use for routing if 100 the destination IP address is not in a static 101 route or on a local network, e.g., 192.168.1.1. 102 For secondary IP addresses on an interface, this 100 the destination IP address is not in a static 101 route or on a local network, e.g., 192.168.1.1. 102 For secondary IP addresses on an interface, this 103 103 parameter should not be specified. If the service 104 104 is ipv4-static-route, this parameter must NOT … … 106 106 107 107 STATIC_GATEWAY - The default IP address to use for routing 108 when setting a static routing address. 108 when setting a static routing address. 109 109 110 110 INTERFACE_COMPONENTS - A list of component interfaces 111 only needed for a compound device such as a bridge. 112 This list is normally a single value, e.g. eth0, 111 only needed for a compound device such as a bridge. 112 This list is normally a single value, e.g. eth0, 113 113 for use with a virtual host such as kvm. 114 114 … … 117 117 ipv4-static 118 118 119 IP - The IP address of the interface, 119 IP - The IP address of the interface, 120 120 e.g. 192.168.1.2. 121 121 … … 123 123 number of the interface. The default, if not 124 124 specified, is 24. 125 126 LABEL - The label to be assigned to the interface. 125 126 LABEL - The label to be assigned to the interface. 127 127 This is normally specified for assigning 128 128 additional IP addresses to a network 129 129 device. Example: eth0:2 (optional) 130 131 BROADCAST - The brodcast address for this interface, 132 e.g 192.168.1.255. If not specified, 130 131 BROADCAST - The brodcast address for this interface, 132 e.g 192.168.1.255. If not specified, 133 133 the broadcast address will be calculated 134 134 from the IP and PREFIX. … … 136 136 ipv4-static-route 137 137 138 TYPE - The type of route, typically 'default', 138 TYPE - The type of route, typically 'default', 139 139 'network', 'or host'. 140 140 … … 146 146 STATIC_GATEWAY - The IP address for a network route. 147 147 148 SOURCE - The source IP address to prefer when sending 148 SOURCE - The source IP address to prefer when sending 149 149 to the destinations covered by the specified 150 150 route. (optional) … … 155 155 at startup. 156 156 157 DHCP_STOP - Optional paremeters to pass to the dhcp client 157 DHCP_STOP - Optional paremeters to pass to the dhcp client 158 158 at shutdown. 159 159 … … 165 165 166 166 IP_FORWARD - An optional flag to enable the system to forward 167 inbound IP packets received by one interface to 168 another outbound interface. 167 inbound IP packets received by one interface to 168 another outbound interface. 169 169 170 170 STP - Set bridge spanning tree protocol. Default is no. … … 172 172 FILES 173 173 /etc/sysconfig/ifconfig.* 174 definitions of network interfaces 174 definitions of network interfaces 175 175 176 176 AUTHORS 177 177 The ifup/ifdown suite was written by Nathan Coulson 178 <nathan@linuxfromscratch.org> and Kevin P. Fleming 178 <nathan@linuxfromscratch.org> and Kevin P. Fleming 179 179 <kpfleming@linuxfromscratch.org> 180 180 and updated by Bruce Dubbs <bdubbs@linuxfromscratch>. -
bootscripts/lfs/sysconfig/createfiles
re7fb2ca ra44ae577 12 12 # <filename> <type> <permissions> <user> <group> 13 13 # if type is equal to "dev" 14 # <filename> <type> <permissions> <user> <group> <devtype> 14 # <filename> <type> <permissions> <user> <group> <devtype> 15 15 # <major> <minor> 16 16 # … … 23 23 # block creates a block device 24 24 # char creates a character deivce 25 # pipe creates a pipe, this will ignore the <major> and 25 # pipe creates a pipe, this will ignore the <major> and 26 26 # <minor> fields 27 # <major> and <minor> are the major and minor numbers used for 27 # <major> and <minor> are the major and minor numbers used for 28 28 # the device. 29 29 ########################################################################
Note:
See TracChangeset
for help on using the changeset viewer.