diff options
author | Renato Botelho <garga@FreeBSD.org> | 2015-01-27 11:50:21 -0200 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2015-01-27 11:50:21 -0200 |
commit | 873cab1610c1fa8ef426476b03a22ec1ed806373 (patch) | |
tree | 039964c97185e82a617ac05b358ded693dda8fd7 /usr/local/sbin | |
parent | db4b45768da09a8a4a08d38c1bc49b9414d876ca (diff) | |
download | pfsense-873cab1610c1fa8ef426476b03a22ec1ed806373.zip pfsense-873cab1610c1fa8ef426476b03a22ec1ed806373.tar.gz |
Teach ufslabels.sh to deal with DESTDIR, useful on installation
Diffstat (limited to 'usr/local/sbin')
-rwxr-xr-x | usr/local/sbin/ufslabels.sh | 6 |
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 |