Align miniboot.cfg with recent kickstart.cfg changes
Incorporate the following commits into miniboot.cfg: - https://review.opendev.org/c/starlingx/metal/+/857894 - https://review.opendev.org/c/starlingx/metal/+/862669 The current redfish installs are broken because the sysadmin user is no longer properly setup for password-change required on first login. This commit pulls in the required change from kickstart.cfg. Test Plan: PASS: - Verify that the sysadmin/sysadmin password is required to change on first login via sushy boot - Verify unsuccessful installation in sushy emulator without this fix - Verify successful installation in sushy emulator with this fix - Verify the FD deletion error is no longer present Story: 2010118 Task: 46714 Signed-off-by: Kyle MacLeod <kyle.macleod@windriver.com> Change-Id: I1c39184c05442946b55ec375e643e94e6dc89fd6
This commit is contained in:
parent
5ee4654b4d
commit
94452bffd3
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user