#
export LC_MESSAGES=C
-if [[ "$UID" = "0" ]]; then
+if [[ "$EUID" = "0" ]]; then
export DRACUT_CP="cp --reflink=auto --sparse=auto --preserve=mode,timestamps,xattr,links -dfr"
else
export DRACUT_CP="cp --reflink=auto --sparse=auto --preserve=mode,timestamps,links -dfr"
for _d in $hookdirs; do
mkdir -m 0755 -p ${initdir}/lib/dracut/hooks/$_d
done
- if [[ "$UID" = "0" ]]; then
+ if [[ "$EUID" = "0" ]]; then
[ -c ${initdir}/dev/null ] || mknod ${initdir}/dev/null c 1 3
[ -c ${initdir}/dev/kmsg ] || mknod ${initdir}/dev/kmsg c 1 11
[ -c ${initdir}/dev/console ] || mknod ${initdir}/dev/console c 5 1
[[ -f $f ]] && inst_simple "$f"
done
if ! ldconfig -r "$initdir"; then
- if [[ $UID = 0 ]]; then
+ if [[ $EUID = 0 ]]; then
derror "ldconfig exited ungracefully"
else
derror "ldconfig might need uid=0 (root) for chroot()"
fi
PRELINK_BIN="$(command -v prelink)"
-if [[ $UID = 0 ]] && [[ $PRELINK_BIN ]]; then
+if [[ $EUID = 0 ]] && [[ $PRELINK_BIN ]]; then
if [[ $DRACUT_FIPS_MODE ]]; then
dinfo "*** Installing prelink files ***"
inst_multiple -o prelink /etc/prelink.conf /etc/prelink.conf.d/*.conf /etc/prelink.cache
fi
fi
-[[ "$UID" != 0 ]] && cpio_owner_root="-R 0:0"
+[[ "$EUID" != 0 ]] && cpio_owner_root="-R 0:0"
if [[ $create_early_cpio = yes ]]; then
echo 1 > "$early_cpio_dir/d/early_cpio"