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