Fix LUSER creation (or no creation).
This commit is contained in:
parent
7b7b5e9624
commit
dd7e0f6793
1 changed files with 7 additions and 4 deletions
|
@ -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; \\
|
||||
echo User \$(LUSER) does not exist; \\
|
||||
echo It will be created with book instructions.; \\
|
||||
fi
|
||||
@\$(call housekeeping)
|
||||
|
||||
|
|
Reference in a new issue