commit: 507f94541982c7449b35af4652cfa55d753043d8
parent 8054f60a3c798d791be0c6d66fed2b38c2ff59c5
Author: Dor Askayo <dor.askayo@gmail.com>
Date: Thu, 12 May 2022 00:03:15 +0300
Remove /dev/null only if it's not a character device
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sysa/helpers.sh b/sysa/helpers.sh
@@ -382,8 +382,8 @@ canonicalise_all_files_timestamp() {
populate_device_nodes() {
# http://www.linuxfromscratch.org/lfs/view/6.1/chapter06/devices.html
mkdir -p "${1}/dev"
- rm "${1}/dev/null" -f
- test -c "${1}/dev/null" || mknod -m 666 "${1}/dev/null" c 1 3
+ test -c "${1}/dev/null" || (rm -f "${1}/dev/null" &&
+ mknod -m 666 "${1}/dev/null" c 1 3)
test -c "${1}/dev/zero" || mknod -m 666 "${1}/dev/zero" c 1 5
test -c "${1}/dev/random" || mknod -m 444 "${1}/dev/random" c 1 8
test -c "${1}/dev/urandom" || mknod -m 444 "${1}/dev/urandom" c 1 9