]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
We have $UID, use it instead of $(id -u)
authorVictor Lowther <victor.lowther@gmail.com>
Sat, 14 Aug 2010 19:23:25 +0000 (14:23 -0500)
committerHarald Hoyer <harald@redhat.com>
Mon, 23 Aug 2010 09:51:34 +0000 (11:51 +0200)
No point in spawning a command and parsing its output when the UID
is already in the environment.

dracut

diff --git a/dracut b/dracut
index bfef92c9746bbcf24a6bdaef65cc3a6b3e9960da..a2bc3121f715d621d12ba71648f3e5142facfe32 100755 (executable)
--- a/dracut
+++ b/dracut
@@ -288,7 +288,7 @@ unset item
 
 # make sure that library links are correct and up to date
 cp -ar /etc/ld.so.conf* "$initdir"/etc
-ldconfig -r "$initdir" || [[ $(id -u) != "0" ]] && dinfo "ldconfig might need uid=0 (root) for chroot()"
+ldconfig -r "$initdir" || [[ $UID != "0" ]] && dinfo "ldconfig might need uid=0 (root) for chroot()"
 
 [[ $beverbose = yes ]] && (du -c "$initdir" | sort -n)