X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/0938cd3031a6e245af650642fe74c7705f940944..7c5eb47ac7e37ce140d46498384984f5144ac28c:/package/base-files/files/etc/init.d/fstab diff --git a/package/base-files/files/etc/init.d/fstab b/package/base-files/files/etc/init.d/fstab index 6dd52f23b..2d2976ffc 100755 --- a/package/base-files/files/etc/init.d/fstab +++ b/package/base-files/files/etc/init.d/fstab @@ -16,7 +16,7 @@ do_mount() { mkdir -p $target config_get_bool enabled "$cfg" "enabled" '1' [ "$enabled" -gt 0 ] && { - /bin/mount -t $fstype -o $options $device $target + mount -t $fstype -o $options $device $target } } @@ -25,8 +25,8 @@ do_swapon() { config_get device "$cfg" device [ -n "device" ] || return 0 config_get_bool enabled "$cfg" "enabled" '1' - [ "$enabled" -gt 0 ] && [ -x /sbin/swapon ] && { - /sbin/swapon $device + [ "$enabled" -gt 0 ] && type swapon >/dev/null && { + swapon $device } } @@ -36,7 +36,7 @@ do_unmount() { [ -n "target" ] || return 0 config_get_bool enabled "$cfg" "enabled" '1' [ "$enabled" -gt 0 ] && { - /bin/umount $target + umount $target } } @@ -45,8 +45,8 @@ do_swapoff() { config_get device "$cfg" device [ -n "device" ] || return 0 config_get_bool enabled "$cfg" "enabled" '1' - [ "$enabled" -gt 0 ] && [ -x /sbin/swapoff ] && { - /sbin/swapoff $device + [ "$enabled" -gt 0 ] && type swapoff >/dev/null && { + swapoff $device } }