Merge "Align miniboot.cfg with recent kickstart.cfg changes"

This commit is contained in:
Zuul 2022-11-02 20:47:41 +00:00 committed by Gerrit Code Review
commit 4d3fcda735

View File

@ -871,7 +871,15 @@ export prefix=""
# Assume there is no Platform Backup (persistent) Partition
export BACKUP_PART_FOUND=0
export STOR_DEV_FDS="$(ls -1 /proc/$$/fd | egrep -v "^(0|1|2|255)$" | xargs)"
export STOR_DEV_FDS=""
export PROC_SELF_FDS="$(ls -1 /proc/$$/fd | egrep -v "^(0|1|2|255)$" | xargs)"
for fd in ${PROC_SELF_FDS}; do
export realpath=$(readlink -f /proc/$$/fd/"${fd}")
if [ -e "${realpath}" ]; then
STOR_DEV_FDS="${STOR_DEV_FDS} ${fd}"
fi
done
##########################################################################
# Local Kickstart variables #
@ -2007,6 +2015,29 @@ true
###########################################################################
%post --interpreter=/bin/bash
HOOK_LABEL="post"
. /tmp/lat/ks_functions.sh
ilog "*********************************************************"
ilog "**** Post - Add user/groups **"
ilog "*********************************************************"
# Set password for root to 'root'
usermod -p '$6$hEv/K.fPeg/$ezIWhJPrMG3WtdEwqQRdyBwdYmPZkqW2PONFAcDd6TqWliYc9dHAwW4MFTlLanVH3/clE0/34FheDMpbAqZVG.' root
# Remove admin user whether it exists or not
deluser admin || true
# Create the sysadmin user
useradd sysadmin -m --shell /bin/bash -G sudo --password 4SuW8cnXFyxsk
chage -d 0 sysadmin
# add 'nobody' group
groupadd nobody
# Reload /etc/group- to make systemd-sysusers.service happy
/usr/sbin/grpconv || report_failure_with_msg "Failed to convert from shadow passwords and groups"
%end
%post --interpreter=/bin/bash
HOOK_LABEL="post"
. /tmp/lat/ks_functions.sh