From cfad45b23ee29a8a0ac6cc2db1e91ee002c07135 Mon Sep 17 00:00:00 2001 From: exodious Date: Sun, 21 Jun 2020 21:30:34 -0400 Subject: [PATCH] Update example on_boot.sh for directory --- .../examples/udm-files/on_boot.d/10-wpa_supplicant.sh | 7 +++++++ on-boot-script/examples/udm-files/on_boot.sh | 10 +++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 on-boot-script/examples/udm-files/on_boot.d/10-wpa_supplicant.sh diff --git a/on-boot-script/examples/udm-files/on_boot.d/10-wpa_supplicant.sh b/on-boot-script/examples/udm-files/on_boot.d/10-wpa_supplicant.sh new file mode 100644 index 0000000..29a75ca --- /dev/null +++ b/on-boot-script/examples/udm-files/on_boot.d/10-wpa_supplicant.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +## create files like this with different numbers for execution order +## ala /etc/profile.d + +## example command to run, please replace with your own. +podman start wpa_supplicant-udmpro diff --git a/on-boot-script/examples/udm-files/on_boot.sh b/on-boot-script/examples/udm-files/on_boot.sh index 2287082..f41f6f4 100644 --- a/on-boot-script/examples/udm-files/on_boot.sh +++ b/on-boot-script/examples/udm-files/on_boot.sh @@ -1,5 +1,9 @@ #!/bin/sh -## example command to run, please replace with your own. -podman start wpa_supplicant-udmpro - +if [ -d /mnt/data/on_boot.d ]; then + for i in /mnt/data/on_boot.d/*.sh; do + if [ -r $i ]; then + . $i + fi + done +fi