diff options
author | Rudolf J Streif <rstreif@debian.streifs.net> | 2016-02-15 12:49:29 -0800 |
---|---|---|
committer | Ulf Wiger <ulf@wiger.net> | 2016-02-23 22:24:27 +0100 |
commit | 147623918ac4d566e06df4f47a2b29b51b110848 (patch) | |
tree | 400239b45091c2ab5e4fc2ac1e60d7b7dbc47f26 | |
parent | 02a3e1b495fd2d95624f6f34a282e2374294d23b (diff) | |
download | rvi_core-147623918ac4d566e06df4f47a2b29b51b110848.tar.gz |
Cleaned up SysVInit init and systemd service files
Removed the SysVInit init and system service files from the scripts
subdirectory and added them to the packaging templates. Debian
(and therefore also Ubuntu packaging) expect the init and service
files in the packaging subdirectory from there debuild will pick
them up automatically. Also adjusted the rules files in debian_template
and ubuntu_template to remove the explicit copy of the init file.
Added yocto_template to hold the init/service files for Yocto Project
builds.
Now all SysVInit init scripts and systemd service files are maintained
with their respective OS template which makes things more transparent
and compliant with the respective OS packaging rules.
Signed-off-by: Rudolf J Streif <rudolf.streif@gmail.com>
-rw-r--r-- | Makefile | 7 | ||||
-rwxr-xr-x | debian_template/rules | 2 | ||||
-rwxr-xr-x | debian_template/rvi.init (renamed from scripts/rvi.init.debian) | 0 | ||||
-rw-r--r-- | scripts/rvi.service.yocto | 18 | ||||
-rwxr-xr-x | ubuntu_template/rules | 2 | ||||
-rwxr-xr-x | ubuntu_template/rvi.init (renamed from scripts/rvi.init.ubuntu) | 0 | ||||
-rwxr-xr-x | yocto_template/rvi.init (renamed from scripts/rvi.init.yocto) | 0 | ||||
-rw-r--r-- | yocto_template/rvi.service (renamed from scripts/rvi.service) | 7 |
8 files changed, 6 insertions, 30 deletions
@@ -27,7 +27,6 @@ SRC_LIST=BUILD.md \ rel \ RELEASE.md \ scripts/setup_gen \ - scripts/rvi.service \ scripts/rvi_ctl.template \ scripts/rvi_install \ python/*.py \ @@ -106,8 +105,7 @@ ubuntu_package: clean ubuntu_clean escript tar czf ./ubuntu_build/rvi_$(VERSION).orig.tar.gz \ --exclude-vcs --transform="s|^|./rvi-$(VERSION)/|" \ $(SRC_LIST) \ - ubuntu_template \ - scripts/rvi.init.ubuntu + ubuntu_template rm -rf ubuntu/missing-sources # Unpack the created tar file (cd ./ubuntu_build; tar xf rvi_$(VERSION).orig.tar.gz) @@ -128,8 +126,7 @@ debian_package: clean debian_clean escript tar czf ./debian_build/rvi_$(VERSION).orig.tar.gz \ --exclude-vcs --transform="s|^|./rvi-$(VERSION)/|" \ $(SRC_LIST) \ - debian_template \ - scripts/rvi.init.debian + debian_template rm -rf debian/missing-sources # Unpack the created tar file (cd ./debian_build; tar xf rvi_$(VERSION).orig.tar.gz) diff --git a/debian_template/rules b/debian_template/rules index 2eb3045..b6b8c0a 100755 --- a/debian_template/rules +++ b/debian_template/rules @@ -19,5 +19,3 @@ override_dh_auto_install: install -D -m 0755 ./debian/rvi/usr/lib/rvi_core/rvi_ctl ./debian/rvi/usr/bin/rvi_ctl # Install default config install -D -m 0644 ./priv/config/rvi_ubuntu.config ./debian/rvi/etc/rvi/rvi.config -# Install start/stop scripts - install -D -m 0755 ./scripts/rvi.init.debian ./debian/rvi/etc/init.d/rvi diff --git a/scripts/rvi.init.debian b/debian_template/rvi.init index 9cd4e59..9cd4e59 100755 --- a/scripts/rvi.init.debian +++ b/debian_template/rvi.init diff --git a/scripts/rvi.service.yocto b/scripts/rvi.service.yocto deleted file mode 100644 index 1ddae5d..0000000 --- a/scripts/rvi.service.yocto +++ /dev/null @@ -1,18 +0,0 @@ -# systemd(8) setup usde by Tizen and others. -[Unit] -Description=Remote Vehicle Interaction Service -Wants=network-online.target - -[Service] -Environment="HOME=/opt/rvi" -Type=forking -StandardOutput=journal -StandardError=journal -ExecStartPre=epmd -daemon -ExecStart=/bin/sh /opt/rvi/rvi.sh -d /etc/opt/rvi -c /etc/opt/rvi/rvi_yocto.config start -ExecStop=/bin/sh /opt/rvi/rvi stop -ExecStopPost=epmd -kill -GuessMainPID=yes - -[Install] -# WantedBy=graphical.target multi-user.target diff --git a/ubuntu_template/rules b/ubuntu_template/rules index 0d2cf19..b6b8c0a 100755 --- a/ubuntu_template/rules +++ b/ubuntu_template/rules @@ -19,5 +19,3 @@ override_dh_auto_install: install -D -m 0755 ./debian/rvi/usr/lib/rvi_core/rvi_ctl ./debian/rvi/usr/bin/rvi_ctl # Install default config install -D -m 0644 ./priv/config/rvi_ubuntu.config ./debian/rvi/etc/rvi/rvi.config -# Install start/stop scripts - install -D -m 0755 ./scripts/rvi.init.ubuntu ./debian/rvi/etc/init.d/rvi diff --git a/scripts/rvi.init.ubuntu b/ubuntu_template/rvi.init index 9cd4e59..9cd4e59 100755 --- a/scripts/rvi.init.ubuntu +++ b/ubuntu_template/rvi.init diff --git a/scripts/rvi.init.yocto b/yocto_template/rvi.init index adbeef5..adbeef5 100755 --- a/scripts/rvi.init.yocto +++ b/yocto_template/rvi.init diff --git a/scripts/rvi.service b/yocto_template/rvi.service index d58dae0..7e84825 100644 --- a/scripts/rvi.service +++ b/yocto_template/rvi.service @@ -1,4 +1,4 @@ -# systemd(8) setup usde by Tizen and others. +# systemd(8) setup usde by Yocto Project [Unit] Description=Remote Vehicle Interaction Service Wants=network-online.target @@ -8,9 +8,10 @@ Environment="HOME=/opt/rvi" Type=forking StandardOutput=journal StandardError=journal -ExecStart=/bin/sh /opt/rvi/rvi_ctl start -ExecStop=/bin/sh /opt/rvi/rvi_ctl stop +ExecStart=/opt/rvi/rvi_ctl start +ExecStop=/opt/rvi/rvi_ctl stop GuessMainPID=yes +RemainAfterExit=yes [Install] WantedBy=graphical.target multi-user.target |