summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoui Chang <louipc.ist@gmail.com>2009-08-04 12:58:01 +0200
committerAaron Griffin <aaronmgriffin@gmail.com>2009-08-05 19:28:41 +0200
commit5258594df2859565a0d2c72a33663162b1cd68b1 (patch)
tree7b6313202914fae7d5a96da696fe7a0f03f11775
parent2c1570f8a4f5bc75683e370763a0ee3526d7e514 (diff)
downloadmkinitcpio-5258594df2859565a0d2c72a33663162b1cd68b1.tar.gz
mkinitcpio-5258594df2859565a0d2c72a33663162b1cd68b1.tar.xz
Set $UID if unset, required by the autodetect hook.
$UID isn't set by default in dash. Signed-off-by: Loui Chang <louipc.ist@gmail.com> Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
-rwxr-xr-xmkinitcpio4
1 files changed, 4 insertions, 0 deletions
diff --git a/mkinitcpio b/mkinitcpio
index 0b0beeb..b37c6ec 100755
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -34,6 +34,10 @@ QUIET="y"
SHOW_AUTOMODS="n"
COMPRESSION="gzip"
+if [ ! $UID ]; then
+ UID=$(id -u)
+fi
+
# Add /{,usr}/sbin to path
# works around undetected problems like in #8448
PATH="${PATH}:/sbin:/usr/sbin"