summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoui Chang <louipc.ist@gmail.com>2009-08-03 14:24:21 +0200
committerAaron Griffin <aaronmgriffin@gmail.com>2009-08-05 19:29:15 +0200
commit7797debad9c55949482e111992c3cd10b221809f (patch)
treed45d6c9134b26600d31ea5d719dea2d7d066825d
parentb8800749b5e301bdf76c8aa1509ea5653d9e7c51 (diff)
downloadmkinitcpio-7797debad9c55949482e111992c3cd10b221809f.tar.gz
mkinitcpio-7797debad9c55949482e111992c3cd10b221809f.tar.xz
Do not rely on -L test; use -h instead.
See `man dash` Signed-off-by: Loui Chang <louipc.ist@gmail.com> Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
-rw-r--r--functions2
-rw-r--r--init2
-rw-r--r--init_functions4
-rwxr-xr-xmkinitcpio2
4 files changed, 5 insertions, 5 deletions
diff --git a/functions b/functions
index 8ad214a..7546088 100644
--- a/functions
+++ b/functions
@@ -87,7 +87,7 @@ add_device ()
add_symlink ()
{
local fil dest dir
- if [ -L ${1} ]; then
+ if [ -h ${1} ]; then
fil="${1##$BASEDIR}"
dest="${2##$BASEDIR}"
add_dir $(dirname "${dest}")
diff --git a/init b/init
index ee29725..c44904c 100644
--- a/init
+++ b/init
@@ -105,7 +105,7 @@ if [ -z "${nfsroot}" -a "${root}" != "/dev/nfs" ]; then
/bin/mknod /dev/root b ${BLOCKDEVICE} >/dev/null
export root="/dev/root"
fi
- if [ ! -b "${root}" -a ! -L "${root}" ]; then
+ if [ ! -b "${root}" -a ! -h "${root}" ]; then
err "Unable to detect or create root device '${root}'"
echo "You are being dropped to a recovery shell"
echo " Type 'reboot' to reboot"
diff --git a/init_functions b/init_functions
index 0e501ca..968258a 100644
--- a/init_functions
+++ b/init_functions
@@ -15,9 +15,9 @@ poll_device() {
seconds=5
fi
echo "Waiting ${seconds} seconds for device ${device} ..."
- while [ ! -b "${device}" -a ! -L "${device}" -a ${seconds} -gt 0 ]; do
+ while [ ! -b "${device}" -a ! -h "${device}" -a ${seconds} -gt 0 ]; do
sleep 1
seconds=$((${seconds}-1))
done
- [ -b "${device}" -o -L "${device}" ]
+ [ -b "${device}" -o -h "${device}" ]
}
diff --git a/mkinitcpio b/mkinitcpio
index ba79882..de47553 100755
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -243,7 +243,7 @@ for hook in ${HOOKS}; do
# Deprecation check
# A hook is considered deprecated if it is a symlink
# within $INSTDIR.
- if [ -L "${INSTDIR}/${hook}" ]; then
+ if [ -h "${INSTDIR}/${hook}" ]; then
newhook="$(readlink -ne "${INSTDIR}/${hook}")"
if [ -n "${newhook}" -a "${INSTDIR}/$(basename ${newhook})" -ef "${newhook}" ]; then
newhook="$(basename ${newhook})"