aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRick Farina (Zero_Chaos) <zerochaos@gentoo.org>2015-08-19 15:32:50 -0400
committerRick Farina (Zero_Chaos) <zerochaos@gentoo.org>2015-08-19 15:32:50 -0400
commit065e3157be7c90a27f09bf7b96ae10943db8a0e3 (patch)
tree1aa9e5f92688e100b7c9d2dc98eaa0b12cfe7081
parentSupport multi-device Btrfs filesystems (diff)
downloadgenkernel-065e3157be7c90a27f09bf7b96ae10943db8a0e3.tar.gz
genkernel-065e3157be7c90a27f09bf7b96ae10943db8a0e3.tar.bz2
genkernel-065e3157be7c90a27f09bf7b96ae10943db8a0e3.zip
fix test to check for execute bit when we plan to execute
as noticed during review of the patch from haasn for btrfs, many tests were checking for file existance before trying to execute while checking for the execute bit makes a bit more sense.
-rw-r--r--defaults/initrd.scripts8
1 files changed, 4 insertions, 4 deletions
diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts
index 4724b55c..a07a4086 100644
--- a/defaults/initrd.scripts
+++ b/defaults/initrd.scripts
@@ -935,7 +935,7 @@ startVolumes() {
if [ "${USE_MDADM}" = '1' ]
then
- if [ -e '/sbin/mdadm' ]
+ if [ -x '/sbin/mdadm' ]
then
/sbin/mdadm --assemble --scan
else
@@ -955,7 +955,7 @@ startVolumes() {
if [ "${USE_DMRAID_NORMAL}" = '1' ]
then
- if [ -e '/sbin/dmraid' ]
+ if [ -x '/sbin/dmraid' ]
then
good_msg "Activating Device-Mapper RAID(s)"
if [ '${DMRAID_OPTS}' = '' ]
@@ -969,7 +969,7 @@ startVolumes() {
if [ "${USE_LVM_NORMAL}" = '1' ]
then
- if [ -e '/bin/lvm' ]
+ if [ -x '/bin/lvm' ]
then
for dev in ${RAID_DEVICES}
do
@@ -1232,7 +1232,7 @@ openLUKS() {
fi
# At this point a candidate key exists (either mounted before or not)
good_msg "${LUKS_KEY} on device ${REAL_LUKS_KEYDEV} found" ${CRYPT_SILENT}
- if [ "$(echo ${LUKS_KEY} | grep -o '.gpg$')" = ".gpg" ] && [ -e /sbin/gpg ] ; then
+ if [ "$(echo ${LUKS_KEY} | grep -o '.gpg$')" = ".gpg" ] && [ -x /sbin/gpg ] ; then
[ -e /dev/tty ] && mv /dev/tty /dev/tty.org
mknod /dev/tty c 5 1
cryptsetup_options="${cryptsetup_options} -d -"