summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-04-17 13:01:25 +0200
committerGitHub <noreply@github.com>2021-04-17 13:01:25 +0200
commit467b9ceb67382d2e6dc2a8ce3839f90b618fa7a2 (patch)
treed8731a3666d26392c61c491498b596cf07797873
parent3510a8868d1e9b67c0c3fdd95072586ea547461c (diff)
parent002d01a1c7aaf93bb740e041a473ff0479ff1da3 (diff)
downloadvyatta-cfg-467b9ceb67382d2e6dc2a8ce3839f90b618fa7a2.tar.gz
vyatta-cfg-467b9ceb67382d2e6dc2a8ce3839f90b618fa7a2.zip
Merge pull request #33 from zdc/T3425-equuleus
scripts: T3425: Make paths to custom scripts relative
-rwxr-xr-xscripts/init/vyos-router20
1 files changed, 10 insertions, 10 deletions
diff --git a/scripts/init/vyos-router b/scripts/init/vyos-router
index 9130307..5912733 100755
--- a/scripts/init/vyos-router
+++ b/scripts/init/vyos-router
@@ -107,35 +107,35 @@ load_bootfile ()
# execute the pre-config script
run_preconfig_script ()
{
- if [ -x /config/scripts/vyos-preconfig-bootup.script ]; then
- /config/scripts/vyos-preconfig-bootup.script
+ if [ -x $vyatta_sysconfdir/config/scripts/vyos-preconfig-bootup.script ]; then
+ $vyatta_sysconfdir/config/scripts/vyos-preconfig-bootup.script
fi
}
# execute the post-config scripts
run_postconfig_scripts ()
{
- if [ -x /config/scripts/vyatta-postconfig-bootup.script ]; then
- /config/scripts/vyatta-postconfig-bootup.script
+ if [ -x $vyatta_sysconfdir/config/scripts/vyatta-postconfig-bootup.script ]; then
+ $vyatta_sysconfdir/config/scripts/vyatta-postconfig-bootup.script
fi
- if [ -x /config/scripts/vyos-postconfig-bootup.script ]; then
- /config/scripts/vyos-postconfig-bootup.script
+ if [ -x $vyatta_sysconfdir/config/scripts/vyos-postconfig-bootup.script ]; then
+ $vyatta_sysconfdir/config/scripts/vyos-postconfig-bootup.script
fi
}
run_postupgrade_script ()
{
- if [ -f /config/.upgraded ]; then
+ if [ -f $vyatta_sysconfdir/config/.upgraded ]; then
# Run the system script
/usr/libexec/vyos/system/post-upgrade
# Run user scripts
- if [ -d /config/scripts/post-upgrade.d ]; then
- run-parts /config/scripts/post-upgrade.d
+ if [ -d $vyatta_sysconfdir/config/scripts/post-upgrade.d ]; then
+ run-parts $vyatta_sysconfdir/config/scripts/post-upgrade.d
fi
- rm -f /config/.upgraded
+ rm -f $vyatta_sysconfdir/config/.upgraded
fi
}