Set sentinel file during generator

Some cloud init scripts may need it ASAP

Signed-off-by: Itxaka <itxaka@spectrocloud.com>
This commit is contained in:
Itxaka 2023-02-08 18:24:02 +01:00
parent 7416a49e21
commit 23b4b8f69f

View File

@ -29,4 +29,15 @@ cos_img=$(getarg cos-img/filename=)
echo "Options=ro,suid,dev,exec,auto,nouser,async"
} > "$GENERATOR_DIR"/sysroot.mount
## END GENERATE SYSROOT
## END GENERATE SYSROOT
# set sentinel file for boot mode
mkdir -p /run/cos
case "${cos_img}" in
*recovery*)
echo -n 1 > /run/cos/recovery_mode ;;
*active*)
echo -n 1 > /run/cos/active_mode ;;
*passive*)
echo -n 1 > /run/cos/passive_mode ;;
esac