diff options
author | Jannik Schönartz | 2021-04-06 19:46:29 +0200 |
---|---|---|
committer | Jannik Schönartz | 2021-04-06 19:46:29 +0200 |
commit | ac606b131ff0d22616ace3cefaa98ce25a4fb738 (patch) | |
tree | a79eadecfe9746c134c9aa462c2b4cf60cd420c3 | |
parent | [bas-python] Add programs, drm dependencie for edid data and remove hooks, be... (diff) | |
download | systemd-init-ac606b131ff0d22616ace3cefaa98ce25a4fb738.tar.gz systemd-init-ac606b131ff0d22616ace3cefaa98ce25a4fb738.tar.xz systemd-init-ac606b131ff0d22616ace3cefaa98ce25a4fb738.zip |
[bas-registration-hook] Export UUID for usage in reg. hooks and the script was an outdated version.
-rwxr-xr-x | modules.d/bas-registration-hooks/module-setup.sh | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | modules.d/bas-registration-hooks/scripts/execute_hooks.sh (renamed from modules.d/bas-registration-hooks/scripts/00_execute_hooks) | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/modules.d/bas-registration-hooks/module-setup.sh b/modules.d/bas-registration-hooks/module-setup.sh index 7f126441..a916a4b6 100755 --- a/modules.d/bas-registration-hooks/module-setup.sh +++ b/modules.d/bas-registration-hooks/module-setup.sh @@ -10,11 +10,11 @@ check() { return 255 } depends() { - : + echo bas-python } install() { # pre-mount is the first hook with guaranteed network access - inst_hook pre-mount 00 "$moddir/scripts/00_execute_hooks" + inst_hook pre-mount 00 "$moddir/scripts/execute_hooks.sh" inst_multiple curl dmidecode return 0 } diff --git a/modules.d/bas-registration-hooks/scripts/00_execute_hooks b/modules.d/bas-registration-hooks/scripts/execute_hooks.sh index 6f57545c..84273095 100644..100755 --- a/modules.d/bas-registration-hooks/scripts/00_execute_hooks +++ b/modules.d/bas-registration-hooks/scripts/execute_hooks.sh @@ -4,12 +4,13 @@ BAS=$(grep -oE 'bas=\S*' /proc/cmdline) BAS=${BAS#'bas='} export BAS UUID=$(dmidecode -q -s system-uuid) +export UUID mkdir /tmp/nexthook cd /tmp/nexthook while true do - curl -s -D header -o script --insecure https://$BAS/api/registrations/$UUID/nexthook + curl -s -D header -o script --insecure https://$BAS/api/registration/$UUID/nexthook if [ -s script ] then echo "" @@ -17,7 +18,7 @@ do then ID=$(grep -oE 'id:\s\S+' header) ID=${ID#'id: '} - curl -s --data "id=$ID" --insecure https://$BAS/api/registrations/$UUID/success > /dev/null + curl -s --data "id=$ID" --insecure https://$BAS/api/registration/$UUID/success > /dev/null echo "" echo "Script with id $ID finished." echo "" @@ -26,7 +27,7 @@ do break fi - drop_shell + # emergency_shell done reboot -f |