runonce: Remove runonce service from the tweaks package
It lives in its own package now, so to prevent conflicts, we should remove it
from the tweaks package and make it depend on it.
Change-Id: Ib8872666fe532924a55006c0395da2117ac399c9
diff --git a/debian/changelog b/debian/changelog
index e6188ef..f87c23b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
aiy-board-tweaks (0.2) UNRELEASED; urgency=medium
* Add in a MAC address generation and storage script.
+ * Migrate runonce into its own package.
-- AIY Projects <support-aiyprojects@google.com> Fri, 04 Jan 2019 13:38:00 -0800
diff --git a/debian/control b/debian/control
index 8ddbfb4..c79e65e 100644
--- a/debian/control
+++ b/debian/control
@@ -9,7 +9,7 @@
Priority: optional
Architecture: all
Depends: e2fsprogs(>=1.43), adduser, sudo, openssh-server, locales, avahi-daemon,
- bluez, network-manager, passwd, python2.7, ${misc:Depends}
+ bluez, network-manager, passwd, python2.7, runonce, ${misc:Depends}
Description: Performs initial system setup work
This package contains the initial "run once" systemd service that performs
initial startup work such as resizing the root filesystem to match the emmc
@@ -17,5 +17,6 @@
default, and other housekeeping behaviors (such as forcing a regeneration of
ssh host keys).
.
- This package is mostly empty, save for the runonce systemd service, so
- removing it should have little effect on a running system.
+ This package actually contains the runonce scripts that do the above. Like the
+ runonce package, removing this one should have little effect on a running
+ system.
diff --git a/debian/dirs b/debian/dirs
deleted file mode 100644
index f4cccf4..0000000
--- a/debian/dirs
+++ /dev/null
@@ -1 +0,0 @@
-var/cache/runonce
diff --git a/debian/rules b/debian/rules
index 522626d..2eac04f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,9 +3,3 @@
%:
dh $@ --with systemd
-
-override_dh_systemd_enable:
- dh_systemd_enable --name=runonce
-
-override_dh_systemd_start:
- dh_systemd_start --no-start
diff --git a/debian/runonce.service b/debian/runonce.service
deleted file mode 100644
index 0187236..0000000
--- a/debian/runonce.service
+++ /dev/null
@@ -1,13 +0,0 @@
-[Unit]
-Description=Scripts that should be run only once
-Before=basic.target network-pre.target
-After=sysinit.target local-fs.target
-DefaultDependencies=no
-
-[Service]
-Type=oneshot
-RemainAfterExit=yes
-ExecStart=/usr/sbin/runonce
-
-[Install]
-WantedBy=basic.target
diff --git a/usr/sbin/runonce b/usr/sbin/runonce
deleted file mode 100755
index dfe173b..0000000
--- a/usr/sbin/runonce
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-for script in /etc/runonce.d/*; do
- fname=$(basename $script)
- [[ -f /var/cache/runonce/$fname ]] && continue
- $script && touch /var/cache/runonce/$fname
-done