summaryrefslogtreecommitdiff
path: root/packages/sysconf/sysconf_0.1.bb
diff options
context:
space:
mode:
authorRod Whitby <rod@whitby.id.au>2007-03-25 11:38:45 +0000
committerRod Whitby <rod@whitby.id.au>2007-03-25 11:38:45 +0000
commitfa2a25a2700d2211fa302a27cb180ce8475f9cd8 (patch)
treeec0b69f6bea7008f533e0f3b75f287f171fc3a01 /packages/sysconf/sysconf_0.1.bb
parent93a28f8e6f88b974630f36d59c7f273e12f6a3be (diff)
sysconf: A general utility for storing network configuration and CONFFILES in a flash partition
Diffstat (limited to 'packages/sysconf/sysconf_0.1.bb')
-rw-r--r--packages/sysconf/sysconf_0.1.bb52
1 files changed, 52 insertions, 0 deletions
diff --git a/packages/sysconf/sysconf_0.1.bb b/packages/sysconf/sysconf_0.1.bb
new file mode 100644
index 0000000000..fd37cd01f7
--- /dev/null
+++ b/packages/sysconf/sysconf_0.1.bb
@@ -0,0 +1,52 @@
+DESCRIPTION = "System Configuration save/restore functionality"
+SECTION = "base"
+PRIORITY = "optional"
+LICENSE = "GPL"
+RDEPENDS = "devio cpio findutils diffutils"
+PR = "r8"
+
+# Currently, the scripts only support ixp4xx machines.
+# Feel free to add to the scripts ...
+COMPATIBLE_MACHINE = '(ixp4xx|nslu2)'
+
+SRC_URI = "file://sysconfsetup \
+ file://conffiles \
+ file://sysconf \
+ "
+
+SCRIPTS = "sysconf"
+INITSCRIPTS = "sysconfsetup"
+
+# This just makes things easier...
+S="${WORKDIR}"
+
+do_install() {
+ # Directories
+ install -d ${D}${sysconfdir} \
+ ${D}${sysconfdir}/default \
+ ${D}${sysconfdir}/init.d \
+ ${D}${base_sbindir}
+
+ # Init scripts
+ install -m 0755 sysconfsetup ${D}${sysconfdir}/init.d/
+
+ # Configuration files
+ install -m 0644 conffiles ${D}${sysconfdir}/default
+
+ # Shell scripts
+ install -m 0755 sysconf ${D}${base_sbindir}/sysconf
+}
+
+pkg_postinst() {
+ opt=
+ test -n "$D" && opt="-r $D"
+ update-rc.d $opt sysconfsetup start 12 S .
+}
+
+pkg_postrm() {
+ opt=
+ test -n "$D" && opt="-r $D"
+ update-rc.d $opt sysconfsetup remove
+}
+
+CONFFILES = "${sysconfdir}/default/conffiles"