From 04c8360c7273c2e7ce78920b836f2c44183bc458 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Tue, 27 Jan 2015 11:50:21 -0200 Subject: Teach ufslabels.sh to deal with DESTDIR, useful on installation --- usr/local/sbin/ufslabels.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usr/local/sbin/ufslabels.sh') 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 -- cgit v1.1