aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/foonas-init/foonas-init_0.10.bb
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/foonas-init/foonas-init_0.10.bb
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
downloadopenembedded-709c4d66e0b107ca606941b988bad717c0b45d9b.tar.gz
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/foonas-init/foonas-init_0.10.bb')
-rw-r--r--recipes/foonas-init/foonas-init_0.10.bb121
1 files changed, 121 insertions, 0 deletions
diff --git a/recipes/foonas-init/foonas-init_0.10.bb b/recipes/foonas-init/foonas-init_0.10.bb
new file mode 100644
index 0000000000..7c51606e7e
--- /dev/null
+++ b/recipes/foonas-init/foonas-init_0.10.bb
@@ -0,0 +1,121 @@
+DESCRIPTION = "FooNAS initial boot and config"
+SECTION = "base"
+PRIORITY = "required"
+LICENSE = "GPL"
+DEPENDS = "base-files devio"
+RDEPENDS = "busybox devio"
+PR = "r1"
+
+SRC_URI = "file://initscripts/fixfstab \
+ file://initscripts/syslog.buffer \
+ file://initscripts/syslog.file \
+ file://initscripts/syslog.network \
+ file://initscripts/rmrecovery \
+ file://initscripts/sysconfsetup \
+ file://initscripts/umountinitrd.sh \
+ file://initscripts/loadmodules.sh \
+ file://functions \
+ file://modulefunctions \
+ file://conffiles \
+ file://sysconf \
+ file://turnup \
+ file://reflash \
+ file://links.conf \
+ "
+
+SBINPROGS = ""
+USRSBINPROGS = ""
+CPROGS = "${USRSBINPROGS} ${SBINPROGS}"
+SCRIPTS = "turnup reflash sysconf"
+INITSCRIPTS = "syslog.buffer syslog.file syslog.network \
+ rmrecovery sysconfsetup umountinitrd.sh \
+ fixfstab loadmodules.sh"
+
+# This just makes things easier...
+
+S="${WORKDIR}"
+
+do_compile() {
+ set -ex
+ for p in ${CPROGS}
+ do
+ ${CC} ${CFLAGS} -o $p $p.c
+ done
+ set +ex
+}
+
+do_install() {
+ set -ex
+
+ # Directories
+ install -d ${D}${sysconfdir} \
+ ${D}${sysconfdir}/default \
+ ${D}${sysconfdir}/init.d \
+ ${D}${sysconfdir}/modutils \
+ ${D}${sysconfdir}/udev \
+ ${D}${sbindir} \
+ ${D}${base_sbindir} \
+ ${D}/initrd \
+
+ # C programs
+ for p in ${USRSBINPROGS}
+ do
+ install -m 0755 $p ${D}${sbindir}/$p
+ done
+ for p in ${SBINPROGS}
+ do
+ install -m 0755 $p ${D}${base_sbindir}/$p
+ done
+
+ # Shell scripts
+ for p in ${SCRIPTS}
+ do
+ install -m 0755 $p ${D}${base_sbindir}/$p
+ done
+
+ #
+ # Init scripts
+ install -m 0644 functions ${D}${sysconfdir}/default
+ install -m 0644 modulefunctions ${D}${sysconfdir}/default
+ for s in ${INITSCRIPTS}
+ do
+ install -m 0755 initscripts/$s ${D}${sysconfdir}/init.d/
+ done
+
+ #
+ # Udev configuration files
+ install -m 0644 links.conf ${D}${sysconfdir}/udev
+
+ # Configuration files
+ install -m 0644 conffiles ${D}${sysconfdir}/default
+
+ set +ex
+}
+
+# NB: do not use '08' (etc) for the first argument after start/stop,
+# the value is interpreted as an octal number if there is a leading
+# zero.
+pkg_postinst_foonas-init() {
+ opt=
+ test -n "$D" && opt="-r $D"
+ update-rc.d $opt hwclock.sh start 8 S . start 45 0 6 .
+ update-rc.d $opt umountinitrd.sh start 9 S .
+ update-rc.d $opt fixfstab start 10 S .
+ update-rc.d $opt syslog.buffer start 11 S . start 49 0 6 .
+ update-rc.d $opt sysconfsetup start 12 S .
+ update-rc.d $opt loadmodules.sh start 21 S .
+ update-rc.d $opt syslog.file start 39 S . start 47 0 6 .
+ update-rc.d $opt syslog.network start 44 S . start 39 0 6 .
+ update-rc.d $opt rmrecovery start 99 1 2 3 4 5 .
+}
+
+pkg_postrm_foonas-init() {
+ opt=
+ test -n "$D" && opt="-r $D"
+ for s in ${INITSCRIPTS}
+ do
+ update-rc.d $opt "$s" remove
+ done
+}
+
+FILES_${PN} = "/"