From bd9b443dc91cdd426808aff21afce7b36c9b0134 Mon Sep 17 00:00:00 2001 From: Ben Wilson Date: Fri, 17 Sep 2021 16:47:51 +0100 Subject: [PATCH] Clean up on break out --- banana-pi.sh | 1 + banana-pro.sh | 1 + gateworks-newport.sh | 1 + gateworks-ventana.sh | 1 + nanopc-t.sh | 1 + nanopi-neo-plus2-minimal.sh | 1 + nanopi-neo-plus2.sh | 1 + odroid-c2.sh | 1 + odroid-xu3.sh | 1 + pinebook-pro.sh | 1 + pinebook.sh | 1 + rpi-64bit-minimal.sh | 1 + rpi-64bit.sh | 1 + rpi.sh | 1 + rpi0w-minimal.sh | 1 + rpi0w.sh | 1 + rpi1.sh | 1 + usb-armory-mkii.sh | 1 + 18 files changed, 18 insertions(+) diff --git a/banana-pi.sh b/banana-pi.sh index 05a59e3..d5044ca 100755 --- a/banana-pi.sh +++ b/banana-pi.sh @@ -137,6 +137,7 @@ systemd-nspawn_exec /third-stage set_locale "$locale" # Clean system include clean_system +trap clean_build ERR SIGTERM SIGINT # Define DNS server after last running systemd-nspawn echo "nameserver 8.8.8.8" >"${work_dir}"/etc/resolv.conf # Disable the use of http proxy in case it is enabled diff --git a/banana-pro.sh b/banana-pro.sh index de8fb7a..87148a3 100755 --- a/banana-pro.sh +++ b/banana-pro.sh @@ -137,6 +137,7 @@ systemd-nspawn_exec /third-stage set_locale "$locale" # Clean system include clean_system +trap clean_build ERR SIGTERM SIGINT # Define DNS server after last running systemd-nspawn echo "nameserver 8.8.8.8" >"${work_dir}"/etc/resolv.conf # Disable the use of http proxy in case it is enabled diff --git a/gateworks-newport.sh b/gateworks-newport.sh index 6c583d2..74cf757 100755 --- a/gateworks-newport.sh +++ b/gateworks-newport.sh @@ -130,6 +130,7 @@ systemd-nspawn_exec /third-stage set_locale "$locale" # Clean system include clean_system +trap clean_build ERR SIGTERM SIGINT # Define DNS server after last running systemd-nspawn echo "nameserver 8.8.8.8" >"${work_dir}"/etc/resolv.conf # Disable the use of http proxy in case it is enabled diff --git a/gateworks-ventana.sh b/gateworks-ventana.sh index f95552a..2c8ee42 100755 --- a/gateworks-ventana.sh +++ b/gateworks-ventana.sh @@ -128,6 +128,7 @@ systemd-nspawn_exec /third-stage set_locale "$locale" # Clean system include clean_system +trap clean_build ERR SIGTERM SIGINT # Define DNS server after last running systemd-nspawn echo "nameserver 8.8.8.8" >"${work_dir}"/etc/resolv.conf # Disable the use of http proxy in case it is enabled diff --git a/nanopc-t.sh b/nanopc-t.sh index fa1d773..49ba687 100755 --- a/nanopc-t.sh +++ b/nanopc-t.sh @@ -130,6 +130,7 @@ systemd-nspawn_exec /third-stage set_locale "$locale" # Clean system include clean_system +trap clean_build ERR SIGTERM SIGINT # Define DNS server after last running systemd-nspawn echo "nameserver 8.8.8.8" >"${work_dir}"/etc/resolv.conf # Disable the use of http proxy in case it is enabled diff --git a/nanopi-neo-plus2-minimal.sh b/nanopi-neo-plus2-minimal.sh index d8d99d9..ae2cabc 100755 --- a/nanopi-neo-plus2-minimal.sh +++ b/nanopi-neo-plus2-minimal.sh @@ -201,6 +201,7 @@ systemd-nspawn_exec /third-stage set_locale "$locale" # Clean system include clean_system +trap clean_build ERR SIGTERM SIGINT # Define DNS server after last running systemd-nspawn echo "nameserver 8.8.8.8" >"${work_dir}"/etc/resolv.conf # Disable the use of http proxy in case it is enabled diff --git a/nanopi-neo-plus2.sh b/nanopi-neo-plus2.sh index d7fb555..a1f35b0 100755 --- a/nanopi-neo-plus2.sh +++ b/nanopi-neo-plus2.sh @@ -215,6 +215,7 @@ systemd-nspawn_exec /third-stage set_locale "$locale" # Clean system include clean_system +trap clean_build ERR SIGTERM SIGINT # Define DNS server after last running systemd-nspawn echo "nameserver 8.8.8.8" >"${work_dir}"/etc/resolv.conf # Disable the use of http proxy in case it is enabled diff --git a/odroid-c2.sh b/odroid-c2.sh index bcf7008..75a5933 100755 --- a/odroid-c2.sh +++ b/odroid-c2.sh @@ -142,6 +142,7 @@ systemd-nspawn_exec /third-stage set_locale "$locale" # Clean system include clean_system +trap clean_build ERR SIGTERM SIGINT # Define DNS server after last running systemd-nspawn echo "nameserver 8.8.8.8" >"${work_dir}"/etc/resolv.conf # Disable the use of http proxy in case it is enabled diff --git a/odroid-xu3.sh b/odroid-xu3.sh index a5ade5c..102d0e4 100755 --- a/odroid-xu3.sh +++ b/odroid-xu3.sh @@ -147,6 +147,7 @@ systemd-nspawn_exec /third-stage set_locale "$locale" # Clean system include clean_system +trap clean_build ERR SIGTERM SIGINT # Define DNS server after last running systemd-nspawn echo "nameserver 8.8.8.8" >"${work_dir}"/etc/resolv.conf # Disable the use of http proxy in case it is enabled diff --git a/pinebook-pro.sh b/pinebook-pro.sh index 01838de..45d2780 100755 --- a/pinebook-pro.sh +++ b/pinebook-pro.sh @@ -139,6 +139,7 @@ systemd-nspawn_exec /third-stage set_locale "$locale" # Clean system include clean_system +trap clean_build ERR SIGTERM SIGINT # Define DNS server after last running systemd-nspawn echo "nameserver 8.8.8.8" >"${work_dir}"/etc/resolv.conf # Disable the use of http proxy in case it is enabled diff --git a/pinebook.sh b/pinebook.sh index e0b2447..6bcec64 100755 --- a/pinebook.sh +++ b/pinebook.sh @@ -206,6 +206,7 @@ systemd-nspawn_exec /third-stage set_locale "$locale" # Clean system include clean_system +trap clean_build ERR SIGTERM SIGINT # Define DNS server after last running systemd-nspawn echo "nameserver 8.8.8.8" >"${work_dir}"/etc/resolv.conf # Disable the use of http proxy in case it is enabled diff --git a/rpi-64bit-minimal.sh b/rpi-64bit-minimal.sh index ed9c7d9..070e861 100755 --- a/rpi-64bit-minimal.sh +++ b/rpi-64bit-minimal.sh @@ -154,6 +154,7 @@ include rpi_userland set_locale "$locale" # Clean system include clean_system +trap clean_build ERR SIGTERM SIGINT # Define DNS server after last running systemd-nspawn echo "nameserver 8.8.8.8" >"${work_dir}"/etc/resolv.conf # Disable the use of http proxy in case it is enabled diff --git a/rpi-64bit.sh b/rpi-64bit.sh index 57dbf3c..b1efeb9 100755 --- a/rpi-64bit.sh +++ b/rpi-64bit.sh @@ -148,6 +148,7 @@ include rpi_userland set_locale "$locale" # Clean system include clean_system +trap clean_build ERR SIGTERM SIGINT # Define DNS server after last running systemd-nspawn echo "nameserver 8.8.8.8" >"${work_dir}"/etc/resolv.conf # Disable the use of http proxy in case it is enabled diff --git a/rpi.sh b/rpi.sh index a09a79f..20e8ed3 100755 --- a/rpi.sh +++ b/rpi.sh @@ -148,6 +148,7 @@ include rpi_firmware set_locale "$locale" # Clean system include clean_system +trap clean_build ERR SIGTERM SIGINT # Define DNS server after last running systemd-nspawn echo "nameserver 8.8.8.8" >"${work_dir}"/etc/resolv.conf # Disable the use of http proxy in case it is enabled diff --git a/rpi0w-minimal.sh b/rpi0w-minimal.sh index 94db588..d9713d4 100755 --- a/rpi0w-minimal.sh +++ b/rpi0w-minimal.sh @@ -144,6 +144,7 @@ include rpi_firmware set_locale "$locale" # Clean system include clean_system +trap clean_build ERR SIGTERM SIGINT # Define DNS server after last running systemd-nspawn echo "nameserver 8.8.8.8" >"${work_dir}"/etc/resolv.conf # Disable the use of http proxy in case it is enabled diff --git a/rpi0w.sh b/rpi0w.sh index 57365f8..98bdf76 100755 --- a/rpi0w.sh +++ b/rpi0w.sh @@ -149,6 +149,7 @@ include rpi_firmware set_locale "$locale" # Clean system include clean_system +trap clean_build ERR SIGTERM SIGINT # Define DNS server after last running systemd-nspawn echo "nameserver 8.8.8.8" >"${work_dir}"/etc/resolv.conf # Disable the use of http proxy in case it is enabled diff --git a/rpi1.sh b/rpi1.sh index a094cc0..ee36f2e 100755 --- a/rpi1.sh +++ b/rpi1.sh @@ -147,6 +147,7 @@ include rpi_firmware set_locale "$locale" # Clean system include clean_system +trap clean_build ERR SIGTERM SIGINT # Define DNS server after last running systemd-nspawn echo "nameserver 8.8.8.8" >"${work_dir}"/etc/resolv.conf # Disable the use of http proxy in case it is enabled diff --git a/usb-armory-mkii.sh b/usb-armory-mkii.sh index c1abc05..7da6784 100755 --- a/usb-armory-mkii.sh +++ b/usb-armory-mkii.sh @@ -172,6 +172,7 @@ systemd-nspawn_exec /third-stage set_locale "$locale" # Clean system include clean_system +trap clean_build ERR SIGTERM SIGINT # Define DNS server after last running systemd-nspawn echo "nameserver 8.8.8.8" >"${work_dir}"/etc/resolv.conf # Disable the use of http proxy in case it is enabled