diff options
author | Adriana Kobylak <anoo@us.ibm.com> | 2019-05-31 13:25:36 -0500 |
---|---|---|
committer | Adriana Kobylak <anoo@us.ibm.com> | 2019-06-21 10:07:04 -0500 |
commit | 10e915abf1bd31d8b1dae8d01c731ac8dd76c7c0 (patch) | |
tree | 692c6eea5cbce78bbfd4837120ae203e708d4503 | |
parent | 851bc064b23c0fcb9c19be30948d1e4f5ec0253a (diff) | |
download | openpower-pnor-code-mgmt-10e915abf1bd31d8b1dae8d01c731ac8dd76c7c0.tar.gz openpower-pnor-code-mgmt-10e915abf1bd31d8b1dae8d01c731ac8dd76c7c0.zip |
Move script and systemd service files into repo
Move the obmc-flash-bios script and systemd service files from
openbmc/openbmc to the local repo.
Tested: PNOR code update was successful on witherspoon.
Change-Id: Ibb7adba0638b8205173cb0ec4d4d61f2aeb6ce28
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
-rwxr-xr-x | Makefile.am | 8 | ||||
-rw-r--r-- | op-pnor-msl.service | 11 | ||||
-rw-r--r-- | org.open_power.Software.Host.Updater.service | 18 | ||||
-rw-r--r-- | ubi/Makefile.am.include | 17 | ||||
-rw-r--r-- | ubi/obmc-flash-bios | 362 | ||||
-rw-r--r-- | ubi/obmc-flash-bios-check-clearvolatile@.service | 13 | ||||
-rw-r--r-- | ubi/obmc-flash-bios-cleanup.service | 7 | ||||
-rw-r--r-- | ubi/obmc-flash-bios-enable-clearvolatile@.service | 14 | ||||
-rw-r--r-- | ubi/obmc-flash-bios-ubiattach.service | 7 | ||||
-rw-r--r-- | ubi/obmc-flash-bios-ubimount@.service | 12 | ||||
-rw-r--r-- | ubi/obmc-flash-bios-ubipatch.service | 10 | ||||
-rw-r--r-- | ubi/obmc-flash-bios-ubiremount.service | 12 | ||||
-rw-r--r-- | ubi/obmc-flash-bios-ubiumount-ro@.service | 9 | ||||
-rw-r--r-- | ubi/obmc-flash-bios-ubiumount-rw@.service | 9 | ||||
-rw-r--r-- | ubi/obmc-flash-bios-updatesymlinks.service | 15 |
15 files changed, 523 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am index f95a44d2d..62cf62212 100755 --- a/Makefile.am +++ b/Makefile.am @@ -13,12 +13,18 @@ openpower_update_manager_SOURCES = \ item_updater_main.cpp \ utils.cpp +if HAVE_SYSTEMD +systemdsystemunit_DATA = \ + op-pnor-msl.service \ + org.open_power.Software.Host.Updater.service +endif + if UBIFS_LAYOUT include ubi/Makefile.am.include else include static/Makefile.am.include if HAVE_SYSTEMD - systemdsystemunit_DATA = \ + systemdsystemunit_DATA += \ openpower-pnor-update@.service endif endif diff --git a/op-pnor-msl.service b/op-pnor-msl.service new file mode 100644 index 000000000..1dbf9afb0 --- /dev/null +++ b/op-pnor-msl.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenPOWER PNOR Minimum Ship Level Verification +After=obmc-flash-bios-updatesymlinks.service + +[Service] +Type=oneshot +ExecStart=/usr/bin/openpower-pnor-msl +RemainAfterExit=yes + +[Install] +WantedBy=obmc-flash-bios-updatesymlinks.service diff --git a/org.open_power.Software.Host.Updater.service b/org.open_power.Software.Host.Updater.service new file mode 100644 index 000000000..82654bfcd --- /dev/null +++ b/org.open_power.Software.Host.Updater.service @@ -0,0 +1,18 @@ +[Unit] +Description=OpenPower Software Update Manager +Wants=xyz.openbmc_project.Software.Version.service +Before=xyz.openbmc_project.Software.Version.service +Before=mboxd.service +Wants=obmc-flash-bios-ubipatch.service +Before=obmc-flash-bios-ubipatch.service +Wants=obmc-mapper.target +After=obmc-mapper.target + +[Service] +ExecStart=/usr/bin/openpower-update-manager +Restart=always +Type=dbus +BusName={BUSNAME} + +[Install] +WantedBy=multi-user.target diff --git a/ubi/Makefile.am.include b/ubi/Makefile.am.include index decf1e9c6..98ea30119 100644 --- a/ubi/Makefile.am.include +++ b/ubi/Makefile.am.include @@ -3,3 +3,20 @@ openpower_update_manager_SOURCES += \ %reldir%/item_updater_ubi.cpp \ %reldir%/serialize.cpp \ %reldir%/watch.cpp + +dist_bin_SCRIPTS = \ + %reldir%/obmc-flash-bios + +if HAVE_SYSTEMD +systemdsystemunit_DATA += \ + %reldir%/obmc-flash-bios-check-clearvolatile@.service \ + %reldir%/obmc-flash-bios-cleanup.service \ + %reldir%/obmc-flash-bios-enable-clearvolatile@.service \ + %reldir%/obmc-flash-bios-ubiattach.service \ + %reldir%/obmc-flash-bios-ubimount@.service \ + %reldir%/obmc-flash-bios-ubipatch.service \ + %reldir%/obmc-flash-bios-ubiremount.service \ + %reldir%/obmc-flash-bios-ubiumount-ro@.service \ + %reldir%/obmc-flash-bios-ubiumount-rw@.service \ + %reldir%/obmc-flash-bios-updatesymlinks.service +endif diff --git a/ubi/obmc-flash-bios b/ubi/obmc-flash-bios new file mode 100644 index 000000000..ff8818518 --- /dev/null +++ b/ubi/obmc-flash-bios @@ -0,0 +1,362 @@ +#!/bin/sh + +# Get the mtd device number (mtdX) +findmtd() { + m="$(grep -xl "$1" /sys/class/mtd/*/name)" + m="${m%/name}" + m="${m##*/}" + echo "${m}" +} + +# Get the ubi device number (ubiX_Y) +findubi() { + u="$(grep -xl "$1" /sys/class/ubi/ubi?/subsystem/ubi*/name)" + u="${u%/name}" + u="${u##*/}" + echo "${u}" +} + +# Get the mount information +is_mounted() { + grep -q "$1" /proc/mounts + return $? +} + +# Attach the pnor mtd device to ubi. +attach_ubi() { + pnormtd="$(findmtd pnor)" + pnor="${pnormtd#mtd}" + pnordev="/dev/mtd${pnor}" + + if [ -d "/sys/class/ubi/ubi${pnor}" ]; then + # Already attached + return 0 + fi + + ubiattach /dev/ubi_ctrl -m "${pnor}" -d "${pnor}" + rc=$? + if [ ${rc} -ne 0 ]; then + # Check the pnor mtd device is formatted as ubi by reading the first 3 byes, + # which should be the ascii chars 'UBI' + magic="$(hexdump -C -n 3 ${pnordev})" + if [[ "${magic}" =~ "UBI" ]]; then + # Device already formatted as ubi, ubiattach failed for some other reason + return ${rc} + else + # Format device as ubi + echo "Starting ubiformat ${pnordev}" + ubiformat "${pnordev}" -y -q + # Retry the ubiattach + ubiattach /dev/ubi_ctrl -m "${pnor}" -d "${pnor}" + fi + fi +} + +mount_squashfs() { + pnormtd="$(findmtd pnor)" + ubidev="/dev/ubi${pnormtd#mtd}" + mountdir="/media/${name}" + vol="$(findubi "${name}")" + img="/tmp/images/${version}/pnor.xz.squashfs" + filesize="$(ls -sh $img | awk -F " " {'print $1'})" + + if is_mounted "${name}"; then + echo "${name} is already mounted." + return 0 + fi + + if [ ! -z "${vol}" ]; then + ubirmvol "${ubidev}" -N "${name}" + fi + + if [ ! -d "${mountdir}" ]; then + mkdir "${mountdir}" + fi + + # Set size of read-only partition equal to pnor.xz.squashfs + ubimkvol "${ubidev}" -N "${name}" -s "${filesize}"KiB --type=static + vol="$(findubi "${name}")" + + if [ $? != 0 ]; then + echo "Unable to create RO volume!" + return 1 + fi + + ubidevid="${vol#ubi}" + ubiupdatevol "/dev/ubi${ubidevid}" "${img}" + + if [ $? != 0 ]; then + echo "Unable to update RO volume!" + return 1 + fi + + ubiblock --create "/dev/ubi${ubidevid}" + + if [ $? != 0 ]; then + echo "Unable to create UBI block for RO volume!" + return 1 + fi + + mount -t squashfs -o ro "/dev/ubiblock${ubidevid}" "${mountdir}" + + if [ $? != 0 ]; then + echo "Unable to mount RO volume!" + return 1 + fi +} + +mount_ubi() { + pnormtd="$(findmtd pnor)" + pnor="${pnormtd#mtd}" + ubidev="/dev/ubi${pnor}" + pnordev="/dev/mtd${pnor}" + + if [[ "${name}" == "pnor-patch" ]]; then + if [[ "$(fw_printenv fieldmode 2>/dev/null)" == "fieldmode=true" ]]; then + return 0 + fi + if [[ ! "$(hexdump -C -n 3 ${pnordev})" =~ "UBI" ]]; then + return 0 + fi + mountdir="/usr/local/share/pnor" + else + mountdir="/media/${name}" + fi + + if [[ "${name}" == "pnor-prsv" ]]; then + size="2MiB" + else + size="16MiB" + fi + + if [ ! -d "${mountdir}" ]; then + mkdir -p "${mountdir}" + fi + + vol="$(findubi "${name}")" + if [ -z "${vol}" ]; then + ubimkvol "${ubidev}" -N "${name}" -s "${size}" + fi + + if ! is_mounted "${name}"; then + mountdev="ubi${pnor}:${name}" + mount -t ubifs "${mountdev}" "${mountdir}" + fi +} + +umount_ubi() { + pnormtd="$(findmtd pnor)" + pnor="${pnormtd#mtd}" + ubidev="/dev/ubi${pnor}" + mountdir="/media/${name}" + + if is_mounted "${name}"; then + umount "${mountdir}" + fi + + vol="$(findubi "${name}")" + id="${vol##*_}" + if [ -n "${id}" ]; then + ubirmvol "${ubidev}" -n "${id}" + fi + + if [ -d "${mountdir}" ]; then + rm -r "${mountdir}" + fi +} + +remount_ubi() { + pnormtd="$(findmtd pnor)" + pnor="${pnormtd#mtd}" + pnordev="/dev/mtd${pnor}" + + # Re-Attach the pnor mtd device to ubi + if [[ $(hexdump -C -n 3 ${pnordev}) =~ "UBI" ]]; then + ubiattach /dev/ubi_ctrl -m "${pnor}" -d "${pnor}" + else + # Device not formatted as ubi. + return 0 + fi + + # Get information on all ubi volumes + ubinfo=$(ubinfo -d ${pnor}) + presentVolumes=${ubinfo##*:} + IFS=', ' read -r -a array <<< "$presentVolumes" + for element in ${array[@]}; + do + elementProperties=$(ubinfo -d $pnor -n $element) + # Get ubi volume name by getting rid of additional properties + name=${elementProperties#*Name:} + name="${name%Character*}" + name="$(echo -e "${name}" | tr -d '[:space:]')" + + if [[ ${name} == pnor-prsv ]] || [[ ${name} == pnor-rw* ]] || [[ ${name} == pnor-ro* ]]; then + mountdir="/media/${name}" + if [ ! -d "${mountdir}" ]; then + mkdir -p "${mountdir}" + fi + + if [[ ${name} == pnor-ro* ]] + then + ubiblock --create /dev/ubi${pnor}_${element} + mount -t squashfs -o ro "/dev/ubiblock${pnor}_${element}" "${mountdir}" + else + mount -t ubifs "ubi${pnor}:${name}" "${mountdir}" + fi + fi + done +} + +update_symlinks() { + PNOR_ACTIVE_PATH="/var/lib/phosphor-software-manager/pnor/" + PNOR_RO_ACTIVE_PATH="/var/lib/phosphor-software-manager/pnor/ro" + PNOR_RO_PREFIX="/media/pnor-ro-" + PNOR_RW_ACTIVE_PATH="/var/lib/phosphor-software-manager/pnor/rw" + PNOR_RW_PREFIX="/media/pnor-rw-" + PNOR_PRSV_ACTIVE_PATH="/var/lib/phosphor-software-manager/pnor/prsv" + PNOR_PRSV="/media/pnor-prsv" + PERSISTENCE_PATH="/var/lib/obmc/openpower-pnor-code-mgmt/" + PNOR_PATCH_LOCATION="/usr/local/share/pnor/" + + # Get a list of all active PNOR versions + data="$(ls -d ${PNOR_RO_PREFIX}*)" + IFS=$'\n' array=(${data}) + + currentVersion="" + lowestPriority=255 + for element in ${array[@]}; do + #Remove the PNOR_RO_PREFIX from the path to get version ID. + versionId="${element#${PNOR_RO_PREFIX}}" + + # Get the priority of active versions from persistence files. + if [[ -f "${PERSISTENCE_PATH}${versionId}" ]]; then + data="$(grep -r "priority" ${PERSISTENCE_PATH}${versionId})" + priority="${data: -1}" + if [[ priority -le lowestPriority ]]; then + lowestPriority=${priority} + currentVersion=${versionId} + fi + fi + done + + # Return if no active version found + if [ -z $currentVersion ]; then + return 0; + fi + + if [ ! -d "${PNOR_ACTIVE_PATH}" ]; then + mkdir -p "${PNOR_ACTIVE_PATH}" + fi + + # If the RW or RO active links doesn't point to the version with + # lowest priority, then remove the symlink and create new ones. + if [[ $(readlink -f "${PNOR_RO_ACTIVE_PATH}") != ${PNOR_RO_PREFIX}${currentVersion} ]]; then + rm -f ${PNOR_RO_ACTIVE_PATH} + rm -rf ${PNOR_PATCH_LOCATION}* + ln -sfv ${PNOR_RO_PREFIX}${currentVersion} ${PNOR_RO_ACTIVE_PATH} + fi + + if [[ $(readlink -f "${PNOR_RW_ACTIVE_PATH}") != ${PNOR_RW_PREFIX}${currentVersion} ]]; then + rm -f ${PNOR_RW_ACTIVE_PATH} + ln -sfv ${PNOR_RW_PREFIX}${currentVersion} ${PNOR_RW_ACTIVE_PATH} + fi + + if [[ ! -h ${PNOR_PRSV_ACTIVE_PATH} ]]; then + ln -sfv ${PNOR_PRSV} ${PNOR_PRSV_ACTIVE_PATH} + fi +} + +ubi_cleanup() { + # When ubi_cleanup is run, it expects one or no active version. + activeVersion=$(busctl --list --no-pager tree \ + org.open_power.Software.Host.Updater | \ + grep /xyz/openbmc_project/software/ | tail -c 9) + + if [[ -z "$activeVersion" ]]; then + vols=$(ubinfo -a | grep -e "pnor-ro-" -e "pnor-rw-" | cut -c 14-) + vols=(${vols}) + else + vols=$(ubinfo -a | grep -e "pnor-ro-" -e "pnor-rw-" | \ + grep -v "$activeVersion" | cut -c 14-) + vols=(${vols}) + fi + + for (( index=0; index<${#vols[@]}; index++ )); do + name=${vols[index]} + umount_ubi + done +} + +clear_volatile() { + service=$(mapper get-service /org/open_power/control/volatile) + clearVolatileEnabled=$(busctl get-property $service /org/open_power/control/volatile xyz.openbmc_project.Object.Enable Enabled) + if [[ "$clearVolatileEnabled" != "b true" ]]; then + return 0 + fi + + PNOR_TOC_FILE="pnor.toc" + PNOR_RO_ACTIVE_PATH="/var/lib/phosphor-software-manager/pnor/ro/" + PNOR_RW_ACTIVE_PATH="/var/lib/phosphor-software-manager/pnor/rw/" + PNOR_PRSV_ACTIVE_PATH="/var/lib/phosphor-software-manager/pnor/prsv/" + + # toc partition string format: + # partition27=HB_VOLATILE,0x02ba9000,0x02bae000,00,ECC,VOLATILE,READWRITE + tocFilePath="${PNOR_RO_ACTIVE_PATH}${PNOR_TOC_FILE}" + volatiles=($(grep VOLATILE "${tocFilePath}" | grep -Eo '^partition([0-9]+)=([A-Za-z0-9_]+)')) + for (( index=0; index<${#volatiles[@]}; index++ )); do + volatileName="$(echo ${volatiles[${index}]} | awk -F '=' '{print $2}')" + + rwVolatile="${PNOR_RW_ACTIVE_PATH}${volatileName}" + if [ -f "${rwVolatile}" ]; then + echo "Clear $rwVolatile" + rm "${rwVolatile}" + fi + prsvVolatile="${PNOR_PRSV_ACTIVE_PATH}${volatileName}" + if [ -f "${prsvVolatile}" ]; then + echo "Clear $prsvVolatile" + rm "${prsvVolatile}" + fi + done + # Always reset the sensor after clearing + busctl set-property $service /org/open_power/control/volatile xyz.openbmc_project.Object.Enable Enabled b false +} + +case "$1" in + ubiattach) + attach_ubi + ;; + squashfsmount) + name="$2" + version="$3" + mount_squashfs + ;; + ubimount) + name="$2" + mount_ubi + ;; + ubiumount) + name="$2" + umount_ubi + ;; + ubiremount) + remount_ubi + ;; + updatesymlinks) + update_symlinks + ;; + ubicleanup) + ubi_cleanup + ;; + clearvolatile) + clear_volatile + ;; + *) + echo "Invalid argument" + exit 1 + ;; +esac +rc=$? +if [ ${rc} -ne 0 ]; then + echo "$0: error ${rc}" + exit ${rc} +fi diff --git a/ubi/obmc-flash-bios-check-clearvolatile@.service b/ubi/obmc-flash-bios-check-clearvolatile@.service new file mode 100644 index 000000000..a5c69eabe --- /dev/null +++ b/ubi/obmc-flash-bios-check-clearvolatile@.service @@ -0,0 +1,13 @@ +[Unit] +Description=Clear the Volatile PNOR partitions in host%I if Enabled +After=obmc-flash-bios-enable-clearvolatile@%i.service +Before=obmc-host-start-pre@%i.target +ConditionPathExists=!/run/openbmc/host@%i-on + +[Service] +Type=oneshot +RemainAfterExit=no +ExecStart=/usr/bin/obmc-flash-bios clearvolatile + +[Install] +RequiredBy=obmc-host-startmin@%i.target diff --git a/ubi/obmc-flash-bios-cleanup.service b/ubi/obmc-flash-bios-cleanup.service new file mode 100644 index 000000000..304895a69 --- /dev/null +++ b/ubi/obmc-flash-bios-cleanup.service @@ -0,0 +1,7 @@ +[Unit] +Description=Clean up UBI volumes unattached to a Host version + +[Service] +Type=oneshot +RemainAfterExit=no +ExecStart=/usr/bin/obmc-flash-bios ubicleanup diff --git a/ubi/obmc-flash-bios-enable-clearvolatile@.service b/ubi/obmc-flash-bios-enable-clearvolatile@.service new file mode 100644 index 000000000..6fe05c7ae --- /dev/null +++ b/ubi/obmc-flash-bios-enable-clearvolatile@.service @@ -0,0 +1,14 @@ +[Unit] +Description=Enable the clearing of the Volatile PNOR partitions in host%I +After=mapper-wait@-org-open_power-control-volatile.service +Before=obmc-flash-bios-check-clearvolatile@%i.service +ConditionPathExists=!/run/openbmc/host@%i-on + +[Service] +Type=oneshot +RemainAfterExit=no +ExecStart=/bin/sh -c "busctl set-property `mapper get-service /org/open_power/control/volatile` /org/open_power/control/volatile xyz.openbmc_project.Object.Enable Enabled b true" +SyslogIdentifier=obmc-flash-bios-enable-clearvolatile + +[Install] +RequiredBy=obmc-host-start@%i.target diff --git a/ubi/obmc-flash-bios-ubiattach.service b/ubi/obmc-flash-bios-ubiattach.service new file mode 100644 index 000000000..f0ed3d853 --- /dev/null +++ b/ubi/obmc-flash-bios-ubiattach.service @@ -0,0 +1,7 @@ +[Unit] +Description=Attach the PNOR mtd device to UBI + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/bin/obmc-flash-bios ubiattach diff --git a/ubi/obmc-flash-bios-ubimount@.service b/ubi/obmc-flash-bios-ubimount@.service new file mode 100644 index 000000000..4d06019ca --- /dev/null +++ b/ubi/obmc-flash-bios-ubimount@.service @@ -0,0 +1,12 @@ +[Unit] +Description=Mount UBIFS volumes pnor-ro-%I, pnor-rw-%I and pnor-prsv +Requires=obmc-flash-bios-ubiattach.service +After=obmc-flash-bios-ubiattach.service +OnFailure=obmc-flash-bios-ubiumount-ro@%i.service obmc-flash-bios-ubiumount-rw@%i.service + +[Service] +Type=oneshot +RemainAfterExit=no +ExecStart=/usr/bin/obmc-flash-bios squashfsmount pnor-ro-%i %i +ExecStart=/usr/bin/obmc-flash-bios ubimount pnor-rw-%i +ExecStart=/usr/bin/obmc-flash-bios ubimount pnor-prsv diff --git a/ubi/obmc-flash-bios-ubipatch.service b/ubi/obmc-flash-bios-ubipatch.service new file mode 100644 index 000000000..0c559620d --- /dev/null +++ b/ubi/obmc-flash-bios-ubipatch.service @@ -0,0 +1,10 @@ +[Unit] +Description=Create a ubi volume for pnor patches +Before=mboxd.service +Wants=usr-local.mount +After=usr-local.mount + +[Service] +Type=oneshot +RemainAfterExit=no +ExecStart=/usr/bin/obmc-flash-bios ubimount pnor-patch diff --git a/ubi/obmc-flash-bios-ubiremount.service b/ubi/obmc-flash-bios-ubiremount.service new file mode 100644 index 000000000..641e20f12 --- /dev/null +++ b/ubi/obmc-flash-bios-ubiremount.service @@ -0,0 +1,12 @@ +[Unit] +Description=Remount the squashfs and ubi volumes after a reboot +Wants=org.open_power.Software.Host.Updater.service +Before=org.open_power.Software.Host.Updater.service + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/bin/obmc-flash-bios ubiremount + +[Install] +WantedBy=multi-user.target diff --git a/ubi/obmc-flash-bios-ubiumount-ro@.service b/ubi/obmc-flash-bios-ubiumount-ro@.service new file mode 100644 index 000000000..b76e62bcd --- /dev/null +++ b/ubi/obmc-flash-bios-ubiumount-ro@.service @@ -0,0 +1,9 @@ +[Unit] +Description=Remove UBIFS volume pnor-ro-%I +Wants=obmc-flash-bios-ubiattach.service +After=obmc-flash-bios-ubiattach.service + +[Service] +Type=oneshot +RemainAfterExit=no +ExecStart=/usr/bin/obmc-flash-bios ubiumount pnor-ro-%i diff --git a/ubi/obmc-flash-bios-ubiumount-rw@.service b/ubi/obmc-flash-bios-ubiumount-rw@.service new file mode 100644 index 000000000..f0f0bb9e0 --- /dev/null +++ b/ubi/obmc-flash-bios-ubiumount-rw@.service @@ -0,0 +1,9 @@ +[Unit] +Description=Remove UBIFS volume pnor-rw-%I +Wants=obmc-flash-bios-ubiattach.service +After=obmc-flash-bios-ubiattach.service + +[Service] +Type=oneshot +RemainAfterExit=no +ExecStart=/usr/bin/obmc-flash-bios ubiumount pnor-rw-%i diff --git a/ubi/obmc-flash-bios-updatesymlinks.service b/ubi/obmc-flash-bios-updatesymlinks.service new file mode 100644 index 000000000..d486088ec --- /dev/null +++ b/ubi/obmc-flash-bios-updatesymlinks.service @@ -0,0 +1,15 @@ +[Unit] +Description=Updates symlinks for active PNOR version +Before=mboxd.service +Before=mboxd-reload@0.service +After=org.open_power.Software.Host.Updater.service +After=op-reset-chassis-running@0.service +ConditionPathExists=!/run/openbmc/chassis@0-on + +[Service] +Type=oneshot +RemainAfterExit=no +ExecStart=/usr/bin/obmc-flash-bios updatesymlinks + +[Install] +WantedBy=mboxd.service mboxd-reload@.service |