Add acpid and apache startup scripts, and have them call update-rc.d.
authorChris Larson <clarson@kergoth.com>
Tue, 2 Dec 2003 22:36:32 +0000 (22:36 +0000)
committerChris Larson <clarson@kergoth.com>
Tue, 2 Dec 2003 22:36:32 +0000 (22:36 +0000)
BKrev: 3fcd13f0H57xM3oWJ1RKXNOcC77faA

acpid/acpid-1.0.2/init [new file with mode: 0644]
acpid/acpid_1.0.2.oe
apache/apache-2.0.47/init [new file with mode: 0644]
apache/apache-2.0.48/init [new file with mode: 0644]
apache/apache_2.0.47.oe
apache/apache_2.0.48.oe

diff --git a/acpid/acpid-1.0.2/init b/acpid/acpid-1.0.2/init
new file mode 100644 (file)
index 0000000..e69de29
index 9e1274b..7b962db 100644 (file)
@@ -10,4 +10,21 @@ do_compile () {
 
 do_install () {
        oe_runmake 'INSTPREFIX=${D}' install
+       install -d ${D}/${sysconfdir}/init.d
+       cat ${FILESDIR}/init | sed -e's,/usr/sbin,${sbindir},g' > ${D}/${sysconfdir}/init.d/acpid
+       chmod 755 ${D}/${sysconfdir}/init.d/acpid
+}
+
+pkg_postinst () {
+       if test -n "$D"; then
+               D="-r $D"
+       fi
+       update-rc.d $D acpid defaults
+}
+
+pkg_prerm () {
+       if test -n "$D"; then
+               D="-r $D"
+       fi
+       update-rc.d $D acpid remove
 }
diff --git a/apache/apache-2.0.47/init b/apache/apache-2.0.47/init
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/apache/apache-2.0.48/init b/apache/apache-2.0.48/init
new file mode 100644 (file)
index 0000000..e69de29
index 10658ee..34ddaa2 100644 (file)
@@ -27,3 +27,28 @@ do_compile () {
        cd ..
        oe_runmake
 }
+
+do_install_append () {
+       install -d ${D}/${sysconfdir}/init.d
+       cat ${FILESDIR}/init | \
+               sed -e 's,/usr/sbin/,${sbindir},g; \
+                       s,/usr/bin/,${bindir},g; \
+                       s,/usr/lib,${libdir},g; \
+                       s,/etc/,${sysconfdir},g; \
+                       s,/usr/,${prefix},g;' > ${D}/${sysconfdir}/init.d/apache
+       chmod 755 ${D}/${sysconfdir}/init.d/apache
+}
+
+pkg_postinst () {
+       if test -n "$D"; then
+               D="-r $D"
+       fi
+       update-rc.d $D apache defaults 91 20
+}
+
+pkg_prerm () {
+       if test -n "$D"; then
+               D="-r $D"
+       fi
+       update-rc.d $D apache remove
+}
index fecb3db..a328d78 100644 (file)
@@ -29,3 +29,28 @@ do_compile () {
        cd ..
        oe_runmake
 }
+
+do_install_append () {
+       install -d ${D}/${sysconfdir}/init.d
+       cat ${FILESDIR}/init | \
+               sed -e 's,/usr/sbin/,${sbindir},g; \
+                       s,/usr/bin/,${bindir},g; \
+                       s,/usr/lib,${libdir},g; \
+                       s,/etc/,${sysconfdir},g; \
+                       s,/usr/,${prefix},g;' > ${D}/${sysconfdir}/init.d/apache
+       chmod 755 ${D}/${sysconfdir}/init.d/apache
+}
+
+pkg_postinst () {
+       if test -n "$D"; then
+               D="-r $D"
+       fi
+       update-rc.d $D apache defaults 91 20
+}
+
+pkg_prerm () {
+       if test -n "$D"; then
+               D="-r $D"
+       fi
+       update-rc.d $D apache remove
+}