metal/bsp-files/kickstarts/post_platform_conf_storage.cfg
Dean Troyer 18922761a6 StarlingX open source release updates
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2018-05-31 07:36:43 -07:00

30 lines
676 B
INI

%post --erroronfail
# Source common functions
. /tmp/ks-functions.sh
# Retrieve the installation uuid from the controller we booted from
INSTALL_UUID=`curl -sf http://pxecontroller/feed/rel-xxxPLATFORM_RELEASExxx/install_uuid`
if [ $? -ne 0 ]
then
INSTALL_UUID=unknown
fi
# Set the security profile mode
secprofile="standard"
profile_mode=`cat /proc/cmdline |xargs -n1 echo |grep security_profile= | grep extended`
if [ -n "$profile_mode" ]; then
secprofile="extended"
fi
mkdir -p -m 0775 /etc/platform
cat <<EOF > /etc/platform/platform.conf
nodetype=storage
subfunction=storage
system_type=Standard
security_profile=$secprofile
INSTALL_UUID=$INSTALL_UUID
EOF
%end