From 576786c97065c8e5638e9e0a7cad688175cd3746 Mon Sep 17 00:00:00 2001 From: Kim Date: Sun, 14 Oct 2018 21:33:06 +0200 Subject: Rework vyos router init (#11) * Add a systemd vyos.target and split the vyatta-router init script to multiple systemd scripts. * remove ref to cloud-init * Remove vyatta-router init and rename vyatta-router to vyos-initialize. * Install files to correct dirs * try to fix systemd boot issues * Update script names run config load in background to not block systemd * Prevent cat: write error: Broken pipe * Rework vyos startup * add systemd to Makefile.am * Update script name * Fix inclusion of getty conf * Fix indentation --- scripts/vyatta-boot-config-loader | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'scripts/vyatta-boot-config-loader') diff --git a/scripts/vyatta-boot-config-loader b/scripts/vyatta-boot-config-loader index d9c0903..f70d88c 100755 --- a/scripts/vyatta-boot-config-loader +++ b/scripts/vyatta-boot-config-loader @@ -48,11 +48,15 @@ umask 0002 # do commit trace '-- begin commit' ret=0 + echo $ret > /tmp/vyos-config-status + sync export COMMIT_VIA=boot-config-loader if ! do_commit ; then do_log err 'Commit failed at boot.' trace '-- commit failed' ret=1 + echo $ret > /tmp/vyos-config-status + sync else trace '-- commit succeeded' fi @@ -69,4 +73,3 @@ umask 0002 ) >$CLOG 2>&1 exit $? - -- cgit v1.2.3 From 8380177fdcf045a9a9fcca0cb9233cf9e9cd4eb0 Mon Sep 17 00:00:00 2001 From: Kim Date: Thu, 18 Oct 2018 15:26:22 +0200 Subject: Create the status file at the correct moment. --- scripts/vyatta-boot-config-loader | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'scripts/vyatta-boot-config-loader') diff --git a/scripts/vyatta-boot-config-loader b/scripts/vyatta-boot-config-loader index f70d88c..aead348 100755 --- a/scripts/vyatta-boot-config-loader +++ b/scripts/vyatta-boot-config-loader @@ -48,15 +48,11 @@ umask 0002 # do commit trace '-- begin commit' ret=0 - echo $ret > /tmp/vyos-config-status - sync export COMMIT_VIA=boot-config-loader if ! do_commit ; then do_log err 'Commit failed at boot.' trace '-- commit failed' ret=1 - echo $ret > /tmp/vyos-config-status - sync else trace '-- commit succeeded' fi @@ -69,6 +65,8 @@ umask 0002 trace '-- teardown succeeded' fi trace '-- exiting' + echo $ret > /tmp/vyos-config-status + sync exit $ret ) >$CLOG 2>&1 -- cgit v1.2.3