summaryrefslogtreecommitdiffstats
path: root/usr/local/sbin
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2015-01-27 11:50:21 -0200
committerRenato Botelho <garga@FreeBSD.org>2015-01-27 11:50:21 -0200
commit873cab1610c1fa8ef426476b03a22ec1ed806373 (patch)
tree039964c97185e82a617ac05b358ded693dda8fd7 /usr/local/sbin
parentdb4b45768da09a8a4a08d38c1bc49b9414d876ca (diff)
downloadpfsense-873cab1610c1fa8ef426476b03a22ec1ed806373.zip
pfsense-873cab1610c1fa8ef426476b03a22ec1ed806373.tar.gz
Teach ufslabels.sh to deal with DESTDIR, useful on installation
Diffstat (limited to 'usr/local/sbin')
-rwxr-xr-xusr/local/sbin/ufslabels.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr/local/sbin/ufslabels.sh b/usr/local/sbin/ufslabels.sh
index 3c0c688..bded665 100755
--- a/usr/local/sbin/ufslabels.sh
+++ b/usr/local/sbin/ufslabels.sh
@@ -61,11 +61,11 @@ find_fs_device() {
DEV=${DEV##/dev/}
}
-FSTAB=/etc/fstab
+FSTAB=${DESTDIR}/etc/fstab
unset NEED_CHANGES
cp ${FSTAB} ${FSTAB}.tmp
-ALL_FILESYSTEMS=$(/usr/bin/awk '/ufs/ && !(/dev\/mirror\// || /dev\/ufsid\// || /dev\/label\// || /dev\/geom\//) {print $2}' /etc/fstab)
+ALL_FILESYSTEMS=$(/usr/bin/awk '/ufs/ && !(/dev\/mirror\// || /dev\/ufsid\// || /dev\/label\// || /dev\/geom\//) {print $2}' ${DESTDIR}/etc/fstab)
for FS in ${ALL_FILESYSTEMS}
do
@@ -86,7 +86,7 @@ do
echo "FS: ${FS} on device ${DEV} with ufsid ${UFSID}"
done
-ALL_SWAPFS=$(/usr/bin/awk '/swap/ && !(/dev\/mirror\// || /dev\/ufsid\// || /dev\/label\// || /dev\/geom\//) {print $1}' /etc/fstab)
+ALL_SWAPFS=$(/usr/bin/awk '/swap/ && !(/dev\/mirror\// || /dev\/ufsid\// || /dev\/label\// || /dev\/geom\//) {print $1}' ${DESTDIR}/etc/fstab)
SWAPNUM=0
for SFS in ${ALL_SWAPFS}
do
OpenPOWER on IntegriCloud