Changeset 970a126
- Timestamp:
- 04/09/2012 07:14:33 PM (12 years ago)
- Branches:
- 10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
- Children:
- 9bb0228
- Parents:
- b12948d
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
bootscripts/lfs/lib/services/init-functions
rb12948d r970a126 779 779 } 780 780 781 ################################################################################ 782 # is_true() # 783 # # 784 # Purpose: Utility to test if a variable is true | yes | 1 # 785 # # 786 ################################################################################ 787 is_true() 788 { 789 [ "$1" = "1" ] || [ "$1" = "yes" ] || [ "$1" = "true" ] || [ "$1" = "y" ] || 790 [ "$1" = "t" ] 791 } 792 781 793 # End /lib/lsb/init-functions -
bootscripts/lfs/lib/services/ipv4-static
rb12948d r970a126 53 53 ip addr add ${args} dev ${1} 54 54 evaluate_retval 55 56 if [ -n "${GATEWAY}" ]; then57 if ip route | grep -q default; then58 log_warning_msg "\nGateway already setup; skipping."59 else60 log_info_msg "Setting up default gateway..."61 ip route add default via ${GATEWAY} dev ${1}62 evaluate_retval63 fi64 fi65 55 else 66 msg="Cannot add IPv4 address ${IP} to ${1}. Already present." 67 log_warning_msg "$msg" 56 log_warning_msg "Cannot add IPv4 address ${IP} to ${1}. Already present." 68 57 fi 69 58 ;; -
bootscripts/lfs/sbin/ifdown
rb12948d r970a126 1 #!/bin/ sh1 #!/bin/bash 2 2 ######################################################################## 3 3 # Begin /sbin/ifdown … … 68 68 fi 69 69 70 # Reverse the order 71 SERVICES= 72 for S in ${SERVICE}; do SERVICES="${SERVICES} ${S}"; done 70 # We only need to first service to bring down the interface 71 S=`echo ${SERVICE} | cut -f1 -d" "` 73 72 74 # This will run the service scripts75 73 if ip link show ${IFACE} > /dev/null 2>&1; then 76 for S in ${SERVICES}; do 77 78 if [ -n "${S}" -a -x "/lib/services/${S}" ]; then 79 IFCONFIG=${file} /lib/services/${S} ${IFACE} down 80 else 81 MSG="Unable to process ${file}. Either " 82 MSG="${MSG}the SERVICE variable was not set " 83 MSG="${MSG}or the specified service cannot be executed." 84 log_failure_msg "$MSG" 85 exit 1 86 fi 87 done 74 if [ -n "${S}" -a -x "/lib/services/${S}" ]; then 75 IFCONFIG=${file} /lib/services/${S} ${IFACE} down 76 else 77 MSG="Unable to process ${file}. Either " 78 MSG="${MSG}the SERVICE variable was not set " 79 MSG="${MSG}or the specified service cannot be executed." 80 log_failure_msg "$MSG" 81 exit 1 82 fi 88 83 else 89 84 log_warning_msg "Interface ${1} doesn't exist." 90 85 fi 91 86 87 # Leave the interface up if there are additional interfaces in the device 92 88 link_status=`ip link show ${IFACE} 2>/dev/null` 93 89 94 90 if [ -n "${link_status}" ]; then 95 91 if [ "$(echo "${link_status}" | grep UP)" != "" ]; then 96 # Set the interface down only if all IP addresses have been removed.97 92 if [ "$(ip addr show ${IFACE} | grep 'inet ')" == "" ]; then 98 93 log_info_msg "Bringing down the ${IFACE} interface..." -
bootscripts/lfs/sbin/ifup
rb12948d r970a126 9 9 # Update : Bruce Dubbs - bdubbs@linuxfromscratch.org 10 10 # 11 # Version : LFS 7. 011 # Version : LFS 7.2 12 12 # 13 13 # Notes : The IFCONFIG variable is passed to the SERVICE script … … 17 17 ######################################################################## 18 18 19 RELEASE="7.0" 19 up() 20 { 21 if ip link show $1 > /dev/null 2>&1; then 22 link_status=`ip link show $1` 23 24 if [ -n "${link_status}" ]; then 25 if ! echo "${link_status}" | grep -q UP; then 26 ip link set $1 up 27 fi 28 fi 29 30 else 31 log_failure_msg "\nInterface ${IFACE} doesn't exist." 32 exit 1 33 fi 34 } 35 36 RELEASE="7.2" 20 37 21 38 USAGE="Usage: $0 [ -hV ] [--help] [--version] interface" … … 79 96 for S in ${SERVICE}; do 80 97 if [ ! -x "/lib/services/${S}" ]; then 81 MSG="\n 98 MSG="\nUnable to process ${file}. Either " 82 99 MSG="${MSG}the SERVICE '${S} was not present " 83 100 MSG="${MSG}or cannot be executed." … … 87 104 done 88 105 89 if [ -z "${CHECK_LINK}" -o \ 90 "${CHECK_LINK}" = "y" -o \ 91 "${CHECK_LINK}" = "yes" -o \92 "${CHECK_LINK}" = "1" ]; then 106 # Create/configure the interface 107 for S in ${SERVICE}; do 108 IFCONFIG=${file} /lib/services/${S} ${IFACE} up 109 done 93 110 94 # Bring up the interface 95 if ip link show ${IFACE} > /dev/null 2>&1; then 96 link_status=`ip link show ${IFACE}` 97 98 if [ -n "${link_status}" ]; then 99 if ! echo "${link_status}" | grep -q UP; then 100 ip link set ${IFACE} up 101 fi 102 fi 103 104 else 105 log_failure_msg2 "Interface ${IFACE} doesn't exist." 106 exit 1 107 fi 108 fi 111 # Bring up the interface and any components 112 for I in $IFACE $INTERFACE_COMPONENTS; do up $I; done 109 113 110 114 # Set MTU if requested. Check if MTU has a "good" value. 111 115 if test -n "${MTU}"; then 112 116 if [[ ${MTU} =~ ^[0-9]+$ ]] && [[ $MTU -ge 68 ]] ; then 113 ip link set dev ${IFACE} mtu $MTU 117 for I in $IFACE $INTERFACE_COMPONENTS; do 118 ip link set dev $I mtu $MTU; 119 done 114 120 else 115 121 log_info_msg2 "Invalid MTU $MTU" … … 117 123 fi 118 124 119 for S in ${SERVICE}; do 120 IFCONFIG=${file} /lib/services/${S} ${IFACE} up 121 done 125 # Set the route default gateway if requested 126 if [ -n "${GATEWAY}" ]; then 127 if ip route | grep -q default; then 128 log_warning_msg "\nGateway already setup; skipping." 129 else 130 log_info_msg "Setting up default gateway..." 131 ip route add default via ${GATEWAY} dev ${IFACE} 132 evaluate_retval 133 fi 134 fi 122 135 123 136 # End /sbin/ifup -
bootscripts/lfs/sbin/ifup.8
rb12948d r970a126 29 29 Show version information. 30 30 31 EXAMPLE 31 EXAMPLES 32 32 ifup eth0 33 33 Bring up the interface defined in the file 34 34 /etc/sysconfig/ifconfig.eth0 35 35 36 ONBOOT=no 37 IFACE=eth0 38 SERVICE=ipv4-static 39 IP=192.168.1.22 40 GATEWAY=192.168.1.1 41 PREFIX=24 42 BROADCAST=192.168.1.255 43 36 44 ifdown eth0:2 37 45 Bring down the interface defined in the file 38 46 /etc/sysconfig/ifconfig.eth0:2 47 48 ONBOOT=no 49 IFACE=eth0:2 50 SERVICE=dhcpcd 51 52 DHCP_START="--waitip" 53 DHCP_STOP="-k" 54 55 # Set PRINTIP="yes" to have the script print the DHCP IP address 56 PRINTIP="yes" 57 58 # Set PRINTALL="yes" to print the DHCP assigned values for 59 # IP, SM, DG, and 1st NS. 60 PRINTALL="no" 61 62 ifup br0 63 Bring up the interface defined in the file 64 /etc/sysconfig/ifconfig.br0 65 66 ONBOOT=yes 67 IFACE=br0 68 SERVICE="bridge ipv4-static" 69 IP=192.168.1.22 70 GATEWAY=192.168.1.1 71 PREFIX=24 72 BROADCAST=192.168.1.255 73 STP=no # Spanning tree protocol, default no 74 INTERFACE_COMPONENTS=eth0 # Add to IFACE 75 IP_FORWARD=true 39 76 40 77 NOTES … … 52 89 face. Standard services are ipv4-static and 53 90 ipv4-static-route. Other services such as dhcp 54 may be installed. 91 or bridge may be installed. This value may 92 be a list of services when the interface is a 93 compound device such as a bridge. 55 94 56 95 ONBOOT - If set to 'yes', the specified interface is 57 96 configured by the netowrk boot script. 97 98 GATEWAY - The default IP address to use for routing if 99 the destination IP address is not in a static 100 route or on a local network, e.g., 192.168.1.1. 101 For secondary IP addresses on an interface, this 102 parameter should not be specified. 103 104 INTERFACE_COMPONENTS - A list of component interfaces 105 only needed for a compound device such as a bridge. 106 This list is normally a single value, e.g. eth0, 107 for use with a virtual host such as kvm. 58 108 59 109 Other paramters that are service specific include: … … 65 115 66 116 PREFIX - The number of bits that specify the network 67 number of the interface, e.g., 24. 117 number of the interface. The default, if not 118 specified, is 24. 68 119 69 GATEWAY - The default IP address to use for routing70 if the destination IP address is not in a71 static route or on a local network, e.g.,72 192.168.1.1. For secondary IP addresses on73 an interface, this parameter should not be74 specified.75 76 120 BROADCAST - The brodcast address for this interface, 77 e.g 192.168.1.255. 121 e.g 192.168.1.255. If not specified, 122 the broadcast address will be calculated 123 from the IP and PREFIX. 78 124 79 125 ipv4-static-route … … 82 128 'network', 'or host'. 83 129 84 IP - The IP address for a network or host, if the i130 IP - The IP address for a network or host, if the 85 131 TYPE is not 'default'. 86 132 … … 93 139 route. (optional) 94 140 141 dhcp/dhclient 142 143 DHCP_START - Optional parameters to pass to the dhcp client 144 at startup. 145 146 DHCP_STOP - Optional paremeters to pass to the dhcp client 147 at shutdown. 148 149 PRINTIP - Flag to print the dhcp address to stdout 150 151 PRINTALL - Flag to print all obtained dhcp data to stdout 152 153 bridge 154 155 IP_FORWARD - An optional flag to enable the system to forward 156 inbound IP packets received by one interface to 157 another outbound interface. 158 159 STP - Set bridge spanning tree protocol. Default is no. 160 95 161 FILES 96 162 /etc/sysconfig/ifconfig.* … … 98 164 99 165 AUTHORS 100 The 166 The ifup/ifdown suite was written by Nathan Coulson 101 167 <nathan@linuxfromscratch.org> and Kevin P. Fleming 102 168 <kpfleming@linuxfromscratch.org> … … 106 172 ip(8). 107 173 108 IFUP/IFDOWN 18 Sep 2011ifup(8)174 IFUP/IFDOWN 8 April 2012 ifup(8) -
chapter01/changelog.xml
rb12948d r970a126 38 38 --> 39 39 <listitem> 40 <para>2012-05-09</para> 41 <itemizedlist> 42 <listitem> 43 <para>[bdubbs] - Update networking bootscripts. See 44 bootscripts change log for details. 45 Fixes 46 <ulink url="&lfs-ticket-root;3053">#3053</ulink>.</para> 47 </listitem> 48 </itemizedlist> 49 </listitem> 50 51 <listitem> 40 52 <para>2012-05-05</para> 41 53 <itemizedlist> -
chapter06/automake.xml
rb12948d r970a126 71 71 72 72 <seglistitem> 73 <seg>acinstall, aclocal, aclocal-&a utomake-version;, automake,74 automake-&a utomake-version;, compile, config.guess, config.sub,73 <seg>acinstall, aclocal, aclocal-&am-minor-version;, automake, 74 automake-&am-minor-version;, compile, config.guess, config.sub, 75 75 depcomp, elisp-comp, install-sh, mdate-sh, missing, mkinstalldirs, 76 76 py-compile, symlink-tree, and ylwrap</seg> 77 <seg>/usr/share/aclocal- 1.11, /usr/share/automake-1.11,77 <seg>/usr/share/aclocal-&am-minor-version;, /usr/share/automake-&am-minor-version;, 78 78 /usr/share/doc/automake-&automake-version;</seg> 79 79 </seglistitem> … … 107 107 108 108 <varlistentry id="aclocalversion"> 109 <term><command>aclocal-&a utomake-version;</command></term>109 <term><command>aclocal-&am-minor-version;</command></term> 110 110 <listitem> 111 111 <para>A hard link to <command>aclocal</command></para> 112 112 <indexterm zone="ch-system-automake aclocalversion"> 113 <primary sortas="b-aclocal-&a utomake-version;">aclocal-&automake-version;</primary>113 <primary sortas="b-aclocal-&am-minor-version;">aclocal-&am-minor-version;</primary> 114 114 </indexterm> 115 115 </listitem> … … 134 134 135 135 <varlistentry id="automake-version"> 136 <term><command>automake-&a utomake-version;</command></term>136 <term><command>automake-&am-minor-version;</command></term> 137 137 <listitem> 138 138 <para>A hard link to <command>automake</command></para> 139 139 <indexterm zone="ch-system-automake automake-version"> 140 <primary sortas="b-automake-&a utomake-version;">automake-&automake-version;</primary>140 <primary sortas="b-automake-&am-minor-version;">automake-&am-minor-version;</primary> 141 141 </indexterm> 142 142 </listitem> -
chapter06/gcc.xml
rb12948d r970a126 290 290 xpointer="xpointer(//*[@os='v'])"/> 291 291 292 <para>Finally, move a misplced file:</para> 293 294 <screen><userinput remap="install">case `uname -m` in 295 i?86) GDBDIR=/usr/share/gdb/auto-load/usr/lib/ ;; 296 *) GDBDIR=/usr/share/gdb/auto-load/usr/lib64/ ;; 297 esac 298 299 mkdir -pv $GDBDIR 300 mv -v /usr/lib/*gdb.py $GDBDIR 301 unset GDBDIR</userinput></screen> 292 <para>Finally, move a misplaced file:</para> 293 294 <screen><userinput remap="install">mkdir -pv /usr/share/gdb/auto-load/usr/lib 295 mv -v /usr/lib/*gdb.py /usr/share/gdb/auto-load/usr/lib</userinput></screen> 302 296 303 297 </sect2> -
chapter07/network.xml
rb12948d r970a126 166 166 variable entirely.</para> 167 167 168 <para>The <envar>PREFIX</envar> variable needs to containthe number of168 <para>The <envar>PREFIX</envar> variable containis the number of 169 169 bits used in the subnet. Each octet in an IP address is 8 bits. If the 170 170 subnet's netmask is 255.255.255.0, then it is using the first three octets … … 173 173 commonly used by DSL and cable-based Internet Service Providers (ISPs). 174 174 In this example (PREFIX=24), the netmask is 255.255.255.0. Adjust the 175 <envar>PREFIX</envar> variable according to your specific subnet.</para> 175 <envar>PREFIX</envar> variable according to your specific subnet.i 176 If omitted, the PREFIX defaults to 24.</para> 177 178 <para>For more information see the <command>ifup</command> man page.</para> 176 179 177 180 </sect2> -
general.ent
rb12948d r970a126 1 <!ENTITY version "SVN-2012040 5">2 <!ENTITY releasedate "Apr 0 5, 2012">1 <!ENTITY version "SVN-20120409"> 2 <!ENTITY releasedate "Apr 09, 2012"> 3 3 <!ENTITY copyrightdate "1999-2012"><!-- jhalfs needs a literal dash, not – --> 4 4 <!ENTITY milestone "7.2"> -
packages.ent
rb12948d r970a126 18 18 19 19 <!ENTITY automake-version "1.11.4"> 20 <!ENTITY am-minor-version "1.11"> 20 21 <!ENTITY automake-size "1,066 KB"> 21 22 <!ENTITY automake-url "&gnu;automake/automake-&automake-version;.tar.xz"> … … 303 304 <!ENTITY less-ch6-sbu "less than 0.1 SBU"> 304 305 305 <!ENTITY lfs-bootscripts-version "20120 322"> <!-- Scripts depend on this format -->306 <!ENTITY lfs-bootscripts-version "20120409"> <!-- Scripts depend on this format --> 306 307 <!ENTITY lfs-bootscripts-size "BOOTSCRIPTS-SIZE KB"> <!-- Updated in Makefile --> 307 308 <!ENTITY lfs-bootscripts-url "&downloads-root;lfs-bootscripts-&lfs-bootscripts-version;.tar.bz2">
Note:
See TracChangeset
for help on using the changeset viewer.