1#!/bin/sh 2 3if [ ! -x /sbin/fw_printenv ]; then 4 exit 1 5fi 6 7# Need to create /run/lock so fw_printenv can create lockfile. 8mkdir /run/lock 9 10# Check uboot keys for 'factory-reset' 11if /sbin/fw_printenv openbmcinit openbmconce | grep -q factory-reset ; then 12 echo "factory-reset" >> /run/format-persist 13fi 14