Skip to content

Commit f5c3870

Browse files
committed
Some tweaks
1 parent 27260a7 commit f5c3870

File tree

4 files changed

+22
-15
lines changed

4 files changed

+22
-15
lines changed

ChangeLog

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2021-06-10 Dmitry Bashkatov <citokot@gmail.com>
2+
3+
* Sync
4+
* Use short mount options to compatible with busybox
5+
* Adapt to merged /usr/bin configuretion
6+
17
2021-04-28 Bruce Dubbs <bdubbs@linuxfromscratch.org>
28
* Make check_signal more robust.
39
* Use a better methog for killproc to remove a dead pid file.
@@ -1010,7 +1016,7 @@ n/a - February 19, 2004
10101016

10111017
* Fixed checkfs script, so it will no longer continue to boot after a
10121018
failure in the init.d/checkfs script. Tested with the help of Andre
1013-
M�ller. Fix suggested by Zack
1019+
Miller. Fix suggested by Zack
10141020

10151021
n/a - February 7, 2004
10161022

lfs/init.d/mountfs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
case "${1}" in
3434
start)
3535
log_info_msg "Remounting root file system in read-write mode..."
36-
mount --options remount,rw / >/dev/null
36+
mount -o remount,rw / >/dev/null
3737
evaluate_retval
3838

3939
# Remove fsck-related file system watermarks.
@@ -47,7 +47,7 @@ case "${1}" in
4747

4848
log_info_msg "Mounting remaining file systems..."
4949
failed=0
50-
mount --all --test-opts no_netdev >/dev/null || failed=1
50+
mount -a -O no_netdev >/dev/null || failed=1
5151
evaluate_retval
5252
exit $failed
5353
;;
@@ -57,12 +57,12 @@ case "${1}" in
5757
log_info_msg "Unmounting all other currently mounted file systems..."
5858
# Ensure any loop devies are removed
5959
losetup -D
60-
umount --all --detach-loop --read-only \
61-
--types notmpfs,nosysfs,nodevtmpfs,noproc,nodevpts >/dev/null
60+
umount -a -d -r \
61+
-t notmpfs,nosysfs,nodevtmpfs,noproc,nodevpts >/dev/null
6262
evaluate_retval
6363

6464
# Make sure / is mounted read only (umount bug)
65-
mount --options remount,ro /
65+
mount -o remount,ro /
6666

6767
# Make all LVM volume groups unavailable, if appropriate
6868
# This fails if swap or / are on an LVM partition

lfs/init.d/network

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,7 @@ case "${1}" in
3535
interface=${file##*/ifconfig.}
3636

3737
# Skip if $file is * (because nothing was found)
38-
if [ "${interface}" = "*" ]
39-
then
40-
continue
41-
fi
38+
if [ "${interface}" = "*" ]; then continue; fi
4239

4340
/sbin/ifup ${interface}
4441
done
@@ -61,10 +58,14 @@ case "${1}" in
6158
interface=${file##*/ifconfig.}
6259

6360
# Skip if $file is * (because nothing was found)
64-
if [ "${interface}" = "*" ]
65-
then
66-
continue
67-
fi
61+
if [ "${interface}" = "*" ]; then continue; fi
62+
63+
# See if interface exists
64+
if [ ! -e /sys/class/net/$interface ]; then continue; fi
65+
66+
# Is inerface UP?
67+
ip link show $interface 2>/dev/null | grep -q "state UP"
68+
if [ $? -ne 0 ]; then continue; fi
6869

6970
/sbin/ifdown ${interface}
7071
done

lfs/lib/services/init-functions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
## Environmental setup
2222
# Setup default values for environment
2323
umask 022
24-
export PATH="/bin:/usr/bin:/sbin:/usr/sbin"
24+
export PATH="/usr/bin"
2525

2626
## Set color commands, used via echo
2727
# Please consult `man console_codes for more information

0 commit comments

Comments
 (0)