Only process items if we can find grep

This commit is contained in:
Scott Ullrich 2010-08-15 14:11:55 -04:00
parent 87db1017ee
commit 8a8f51b7cb

8
etc/rc
View File

@ -29,9 +29,11 @@ version=`cat /etc/version`
echo "Mounting filesystems..."
# Handle ZFS read-only case
WHEREISROOT=`/sbin/mount | /usr/bin/grep " / " | /usr/bin/grep "tank" | /usr/bin/cut -d' ' -f1`
if [ "$WHEREISROOT" != "" ]; then
/sbin/zfs set readonly=off $WHEREISROOT
if [ -f /usr/bin/grep ]; then
WHEREISROOT=`/sbin/mount | /usr/bin/grep " / " | /usr/bin/grep "tank" | /usr/bin/cut -d' ' -f1`
if [ "$WHEREISROOT" != "" ]; then
/sbin/zfs set readonly=off $WHEREISROOT
fi
fi
if [ "$PLATFORM" = "cdrom" ]; then