summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUnicronNL <kim.sidney@gmail.com>2018-10-21 13:09:43 +0200
committerUnicronNL <kim.sidney@gmail.com>2018-10-21 13:09:43 +0200
commit512553a3e388b546b7792e627be99c089f62ad9a (patch)
tree4e4f7b9e77696376b7a36d0f8b00cd5232280ea7
parent8380177fdcf045a9a9fcca0cb9233cf9e9cd4eb0 (diff)
downloadvyatta-cfg-512553a3e388b546b7792e627be99c089f62ad9a.tar.gz
vyatta-cfg-512553a3e388b546b7792e627be99c089f62ad9a.zip
Move systemd mods to /lib directory
Remove redundant my_commit check Do not show output on serial-getty (double output issue)
-rw-r--r--Makefile.am7
-rw-r--r--lib/systemd/aftervyos.conf (renamed from etc/systemd/aftervyos.conf)0
-rw-r--r--lib/systemd/serial/aftervyos.conf3
-rwxr-xr-xscripts/init/vyos-config14
4 files changed, 14 insertions, 10 deletions
diff --git a/Makefile.am b/Makefile.am
index 81c1b1b..affc413 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -38,8 +38,11 @@ systemdinit_SCRIPTS += scripts/init/vyos-config
systemdgeneratordir = /lib/systemd/system-generators/
systemdgenerator_SCRIPTS = scripts/system-generators/vyos-generator
-systemdgettydir = /etc/systemd/system/getty@.service.d/
-systemdgetty_DATA = etc/systemd/aftervyos.conf
+systemdgettydir = /lib/systemd/system/getty@.service.d/
+systemdgetty_DATA = lib/systemd/aftervyos.conf
+
+systemdserialgettydir = /lib/systemd/system/serial-getty@.service.d/
+systemdserialgetty_DATA = lib/systemd/serial/aftervyos.conf
src/cparse/cparse.cpp: src/cparse/cparse.ypp src/cparse/cparse_def.h
bison -p cparse_ --defines=src/cparse/cparse.h -o $@ $<
diff --git a/etc/systemd/aftervyos.conf b/lib/systemd/aftervyos.conf
index c575390..c575390 100644
--- a/etc/systemd/aftervyos.conf
+++ b/lib/systemd/aftervyos.conf
diff --git a/lib/systemd/serial/aftervyos.conf b/lib/systemd/serial/aftervyos.conf
new file mode 100644
index 0000000..8ba4277
--- /dev/null
+++ b/lib/systemd/serial/aftervyos.conf
@@ -0,0 +1,3 @@
+[Service]
+ExecStartPre=-/usr/libexec/vyos/init/vyos-config SERIAL
+StandardOutput=journal+console
diff --git a/scripts/init/vyos-config b/scripts/init/vyos-config
index c3b826f..3564270 100755
--- a/scripts/init/vyos-config
+++ b/scripts/init/vyos-config
@@ -1,9 +1,5 @@
#!/bin/bash
-while ps -ef | grep my_commit | grep -q -v grep; do
- sleep 1
-done
-
while [ ! -f /tmp/vyos-config-status ]
do
sleep 1
@@ -11,8 +7,10 @@ done
status=$(cat /tmp/vyos-config-status)
-if [ $status -ne 0 ]; then
- echo "Configuration error"
-else
- echo "Configuration success"
+if [ -z "$1" ]; then
+ if [ $status -ne 0 ]; then
+ echo "Configuration error"
+ else
+ echo "Configuration success"
+ fi
fi