Initial commit

This commit is contained in:
Your Name
2026-04-23 17:07:55 +08:00
commit b7e39e063b
16725 changed files with 1625565 additions and 0 deletions
@@ -0,0 +1,34 @@
#!/bin/sh
# Purpose: Upgrade pre-release BMCs with items needed for hostconsole group
# This can be removed when there is no longer a direct upgrade path for BMCs
# which were installed with pre-release images.
# Create groups if not already present
if grep -wq hostconsole /etc/group; then
echo "hostconsole group already exists"
else
echo "hostconsole group does not exist, add it"
groupadd -f hostconsole
fi
# Add the root user to the groups
if id -nG root | grep -wq hostconsole; then
echo "root already in hostconsole"
else
echo "root not in group hostconsole, add it"
usermod -a -G hostconsole root
fi
# Add all users in the priv-admin group to the
# hostconsole group so that it will not break
# exiting setup for any user.
for usr in $(grep '^'priv-admin':.*$' /etc/group | cut -d: -f4 | tr ',' ' ')
do
# Add the usr to the hostconsole group
if id -nG "$usr" | grep -wq hostconsole; then
echo "$usr already in hostconsole"
else
echo "$usr not in group hostconsole, add it"
usermod -a -G hostconsole "$usr"
fi
done
@@ -0,0 +1,15 @@
[Unit]
Description=Phosphor Ldap config updater
Wants=nslcd.service nscd.service
After=nslcd.service nscd.service
Before=xyz.openbmc_project.Software.Sync.service
[Service]
ExecStart=/usr/bin/env phosphor-ldap-conf
SyslogIdentifier=phosphor-ldap-conf
Restart=always
Type=dbus
BusName={BUSNAME}
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,13 @@
[Unit]
Description=Phosphor User Manager
[Service]
ExecStartPre=-/usr/libexec/upgrade_hostconsole_group.sh
ExecStart=/usr/bin/env phosphor-user-manager
SyslogIdentifier=phosphor-user-manager
Restart=always
Type=dbus
BusName={BUSNAME}
[Install]
WantedBy=multi-user.target