summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rwxr-xr-xdebian/rules7
-rw-r--r--debian/vyatta-cfg.install2
-rw-r--r--debian/vyatta-cfg.postinst.in3
-rw-r--r--debian/vyatta-cfg.postrm.in4
-rw-r--r--debian/vyatta-cfg.vyatta-router.service22
-rw-r--r--debian/vyatta-cfg.vyos-router.service18
-rw-r--r--debian/vyatta-cfg.vyos.target3
7 files changed, 32 insertions, 27 deletions
diff --git a/debian/rules b/debian/rules
index eab1375..2603b2d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,5 +1,9 @@
#!/usr/bin/make -f
+DIR := debian/vyatta-cfg
+VYOS_LIBEXEC_DIR := usr/libexec/vyos
+SYSTEM_GENERATORS_DIR := lib/systemd/system-generators
+
export DH_OPTIONS
## uncomment to enable hardening
@@ -44,5 +48,6 @@ override_dh_install:
dh_install $(inst_opts)
override_dh_systemd_enable:
- dh_systemd_enable -pvyatta-cfg --name vyatta-router vyatta-router.service
+ dh_systemd_enable -pvyatta-cfg --name vyos-router vyos-router.service
+ dh_systemd_enable -pvyatta-cfg --name vyos vyos.target
diff --git a/debian/vyatta-cfg.install b/debian/vyatta-cfg.install
index 8c9aca2..abbe975 100644
--- a/debian/vyatta-cfg.install
+++ b/debian/vyatta-cfg.install
@@ -4,3 +4,5 @@ opt/vyatta/share/vyatta-cfg/functions
opt/vyatta/sbin
opt/vyatta/etc
bin
+usr/libexec
+lib
diff --git a/debian/vyatta-cfg.postinst.in b/debian/vyatta-cfg.postinst.in
index fc9b07b..a741b62 100644
--- a/debian/vyatta-cfg.postinst.in
+++ b/debian/vyatta-cfg.postinst.in
@@ -16,8 +16,7 @@ for dir in $sysconfdir/config $prefix/config; do
chgrp vyattacfg $dir 2>/dev/null
done
-update-rc.d vyatta-router defaults 90 >/dev/null
-systemctl enable vyatta-router.service >/dev/null
+systemctl enable vyos-router.service >/dev/null
# capability stuff
for bin in my_cli_bin my_cli_shell_api; do
diff --git a/debian/vyatta-cfg.postrm.in b/debian/vyatta-cfg.postrm.in
index b184f20..b4cbc80 100644
--- a/debian/vyatta-cfg.postrm.in
+++ b/debian/vyatta-cfg.postrm.in
@@ -1,7 +1,7 @@
#!/bin/bash -e
if [ "$1" = "purge" ]; then
- update-rc.d vyatta-router remove >/dev/null || exit $?
- systemctl disable vyatta-router.service >/dev/null || exit $?
+ systemctl disable vyos-initialize.service >/dev/null || exit $?
+ systemctl disable vyos-config-load.service >/dev/null || exit $?
fi
diff --git a/debian/vyatta-cfg.vyatta-router.service b/debian/vyatta-cfg.vyatta-router.service
deleted file mode 100644
index 0ecf6f4..0000000
--- a/debian/vyatta-cfg.vyatta-router.service
+++ /dev/null
@@ -1,22 +0,0 @@
-[Unit]
-SourcePath=/etc/init.d/vyatta-router
-Description=VyOS Router
-Before=runlevel2.target runlevel3.target runlevel4.target runlevel5.target shutdown.target getty@tty1.service getty@tty2.service getty@rrt3.service getty@tty4.service getty@tty5.service getty@tty6.service
-After=systemd-journald-dev-log.socket time-sync.target local-fs.target
-Conflicts=shutdown.target
-
-[Service]
-Type=oneshot
-Restart=no
-TimeoutSec=5min
-IgnoreSIGPIPE=no
-KillMode=process
-GuessMainPID=no
-RemainAfterExit=yes
-SysVStartPriority=4
-ExecStart=/etc/init.d/vyatta-router start
-ExecStop=/etc/init.d/vyatta-router stop
-StandardOutput=journal+console
-
-[Install]
-WantedBy=multi-user.target
diff --git a/debian/vyatta-cfg.vyos-router.service b/debian/vyatta-cfg.vyos-router.service
new file mode 100644
index 0000000..9cc6f12
--- /dev/null
+++ b/debian/vyatta-cfg.vyos-router.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=VyOS Router
+After=systemd-journald-dev-log.socket time-sync.target local-fs.target
+Conflicts=shutdown.target
+Before=systemd-user-sessions.service
+
+[Service]
+Type=simple
+Restart=no
+TimeoutSec=5min
+KillMode=process
+RemainAfterExit=yes
+ExecStart=/usr/libexec/vyos/init/vyos-router start
+ExecStop=/usr/libexec/vyos/init/vyos-router stop
+StandardOutput=journal+console
+
+[Install]
+WantedBy=vyos.target
diff --git a/debian/vyatta-cfg.vyos.target b/debian/vyatta-cfg.vyos.target
new file mode 100644
index 0000000..47c91c1
--- /dev/null
+++ b/debian/vyatta-cfg.vyos.target
@@ -0,0 +1,3 @@
+[Unit]
+Description=VyOS target
+After=multi-user.target