aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCheng Cui <cc@FreeBSD.org>2023-11-24 15:47:18 +0000
committerCheng Cui <cc@FreeBSD.org>2024-01-19 10:45:28 +0000
commit404b91dac415c5c9126fb4201145049c4d3dfbba (patch)
tree3cc79fb9a0248be9e671bd3d25469fbeb1403e6d
parentf027083b906abb67120974d9c23570c4bd46d156 (diff)
downloadsrc-404b91dac415.tar.gz
src-404b91dac415.zip
libexec/rc/rc.initdiskless: make tar's path flexible
PR: 274977 (cherry picked from commit 93b7818226cf5270646725805b4a8c17a1ad3761 and from commit a04ca1c229195c7089b878a94fbe76505ea693b5)
-rw-r--r--libexec/rc/rc.initdiskless4
1 files changed, 3 insertions, 1 deletions
diff --git a/libexec/rc/rc.initdiskless b/libexec/rc/rc.initdiskless
index 9b37497c1e7e..8b4a01187636 100644
--- a/libexec/rc/rc.initdiskless
+++ b/libexec/rc/rc.initdiskless
@@ -362,6 +362,8 @@ done
# so if the cpio archive is present, it prevents the files from dir/
# from being copied.
+PATH=${PATH}:/rescue
+
for i in ${templates} ; do
for j in /conf/$i/* ; do
subdir=${j##*/}
@@ -376,7 +378,7 @@ for i in ${templates} ; do
if [ -f $j ]; then
create_md $subdir
echo "Loading /$subdir from cpio archive $j"
- (cd / ; /rescue/tar -xpf $j)
+ (cd / ; tar -xpf $j)
fi
done
for j in /conf/$i/*/extract ; do