Fix LUSER creation (or no creation).

This commit is contained in:
Pierre Labastie 2020-04-02 11:46:36 +00:00
parent 7b7b5e9624
commit dd7e0f6793

View file

@ -528,8 +528,8 @@ ck_UID:
fi
mk_SETUP:
@sudo make save-luser
@\$(call echo_SU_request)
@sudo make save-luser
@sudo make BREAKPOINT=\$(BREAKPOINT) SETUP
@touch \$@
@ -628,15 +628,18 @@ create-sbu_du-report: mk_BOOT
save-luser:
@\$(call echo_message, Building)
@LUSER_ID=\$(grep '^\$(LUSER):' /etc/passwd | cut -d: -f3); \\
if [ -n "\$LUSER_ID" ]; then \\
if [ -n "\$\$LUSER_ID" ]; then \\
if [ ! -d \$(LUSER_HOME).XXX ]; then \\
mv \$(LUSER_HOME){,.XXX}; \\
mkdir \$(LUSER_HOME); \\
chown \$(LUSER):\$(LGROUP) \$(LUSER_HOME); \\
echo "\$LUSER_ID" > luser-id; \\
fi; \\
echo "\$\$LUSER_ID" > luser-id; \\
echo User \$(LUSER) exists with ID \$\$LUSER_ID; \\
else \\
rm luser-id; \\
rm luser-id; \\
echo User \$(LUSER) does not exist; \\
echo It will be created with book instructions.; \\
fi
@\$(call housekeeping)