commit | 1a0849801e7b95f02cec172cae47792dc0904e8f | [log] [tgz] |
---|---|---|
author | William A. Kennington III <wak@google.com> | Wed Jul 20 20:51:51 2022 -0700 |
committer | William A. Kennington III <wak@google.com> | Thu Jul 21 10:47:20 2022 -0700 |
tree | 466bdae55bacfabedb59db2cf5374e3b18be653a | |
parent | e5b0aa99484028fd28fb57f203999c71545c6f21 [diff] |
gbmc-bridge: Add invariant to guarantee RWFS is clear This ensures that skipping powercycles or future rm calls causes the netboot to fail out. Change-Id: I70ae860fbbf5996e3476700bf8c0cb0c3a9030b5 Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/recipes-google/networking/gbmc-bridge/49-purge-rwfs.sh b/recipes-google/networking/gbmc-bridge/49-purge-rwfs.sh index 247f9ed..5c2232e 100644 --- a/recipes-google/networking/gbmc-bridge/49-purge-rwfs.sh +++ b/recipes-google/networking/gbmc-bridge/49-purge-rwfs.sh
@@ -16,6 +16,9 @@ [ -z "${gbmc_purge_rwfs-}" ] || return gbmc_purge_rwfs_hook() { + # Ensure that we don't succeed unless it clears + GBMC_BR_DHCP_OUTSTANDING[gbmc_purge_rwfs]=1 + # Only execute this hook if we aren't already purged if [ -e '/run/initramfs/rwfs-purged' ]; then echo 'RWFS already purged' >&2
diff --git a/recipes-google/networking/gbmc-bridge/51-clear-purge-rwfs.sh b/recipes-google/networking/gbmc-bridge/51-clear-purge-rwfs.sh index 198af89..4f65919 100644 --- a/recipes-google/networking/gbmc-bridge/51-clear-purge-rwfs.sh +++ b/recipes-google/networking/gbmc-bridge/51-clear-purge-rwfs.sh
@@ -17,6 +17,7 @@ gbmc_clear_purge_rwfs_hook() { rm -f /run/initramfs/rwfs-purged + unset GBMC_BR_DHCP_OUTSTANDING[gbmc_purge_rwfs] } GBMC_BR_DHCP_HOOKS+=(gbmc_clear_purge_rwfs_hook)