summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Larson <clarson@kergoth.com>2003-12-02 23:10:33 +0000
committerChris Larson <clarson@kergoth.com>2003-12-02 23:10:33 +0000
commitaad59e0474935c1b98ab53eb5026e8a7f6d64b5b (patch)
tree18b0d5f9b5ccc2d820dea18a45ed4f559f1ab04a
parent48caaff9da7af37cb769c1dbcfd5de4b9bc3d595 (diff)
update-rc.d calls for apmd.
BKrev: 3fcd1be9gKSlsWAp6K114BYax1gTuQ
-rw-r--r--apmd/apmd-3.2.0-r0/init0
-rw-r--r--apmd/apmd_3.2.0.oe16
2 files changed, 15 insertions, 1 deletions
diff --git a/apmd/apmd-3.2.0-r0/init b/apmd/apmd-3.2.0-r0/init
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/apmd/apmd-3.2.0-r0/init
diff --git a/apmd/apmd_3.2.0.oe b/apmd/apmd_3.2.0.oe
index f8c8653811..e76e4dd028 100644
--- a/apmd/apmd_3.2.0.oe
+++ b/apmd/apmd_3.2.0.oe
@@ -50,11 +50,25 @@ do_install() {
install -m 0755 ${S}/.libs/apmd ${D}/${sbindir}/apmd
install -m 0755 ${S}/debian/apmd_proxy ${D}/${sysconfdir}/apm/
install -m 0644 ${S}/debian/apmd_proxy.conf ${D}/usr/share/apmd/
- install -m 0755 ${S}/debian/apmd.init ${D}/${sysconfdir}/init.d/apmd
install -m 0644 ${S}/debian/apmd.default ${D}/${sysconfdir}/default/apmd
install -m 0755 .libs/libapm.so.1.0.0 ${D}/${libdir}
ln -sf ./libapm.so.1.0.0 ${D}/${libdir}/libapm.so.1.0
ln -sf ./libapm.so.1.0.0 ${D}/${libdir}/libapm.so.1
+ cat ${FILESDIR}/init | sed -e 's,/usr/sbin,${sbindir},g; s,/etc,${sysconfdir},g;' > ${D}/${sysconfdir}/init.d/apmd
+ chmod 755 ${D}/${sysconfdir}/init.d/apmd
+}
+
+pkg_postinst () {
+ if test -n "$D"; then
+ D="-r $D"
+ fi
+ update-rc.d $D apmd defaults
+}
+pkg_prerm () {
+ if test -n "$D"; then
+ D="-r $D"
+ fi
+ update-rc.d $D apmd remove
}