From efcce444dbc01bd310c2e19e87e5f0bdc4031a17 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 26 Jun 2021 23:37:43 +0200 Subject: Debian: ensure path for vyos-postconfig-bootup.script exists --- debian/vyos-1x.postinst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/debian/vyos-1x.postinst b/debian/vyos-1x.postinst index f191feb3a..2d7411061 100644 --- a/debian/vyos-1x.postinst +++ b/debian/vyos-1x.postinst @@ -72,11 +72,12 @@ for init in openswan ipsec setkey; do done # create /opt/vyatta/etc/config/scripts/vyos-postconfig-bootup.script -# this should be after 'mkdir -p /opt/vyatta/etc/config/scripts' above -if [ ! -x /opt/vyatta/etc/config/scripts/vyos-postconfig-bootup.script ]; then - touch /opt/vyatta/etc/config/scripts/vyos-postconfig-bootup.script - chmod 755 /opt/vyatta/etc/config/scripts/vyos-postconfig-bootup.script - cat <>/opt/vyatta/etc/config/scripts/vyos-postconfig-bootup.script +POSTCONFIG_SCRIPT=/opt/vyatta/etc/config/scripts/vyos-postconfig-bootup.script +if [ ! -x $POSTCONFIG_SCRIPT ]; then + mkdir -p $(dirname $POSTCONFIG_SCRIPT) + touch $POSTCONFIG_SCRIPT + chmod 755 $POSTCONFIG_SCRIPT + cat <>$POSTCONFIG_SCRIPT #!/bin/sh # This script is executed at boot time after VyOS configuration is fully applied. # Any modifications required to work around unfixed bugs -- cgit v1.2.3