1 DESCRIPTION = "SlugOS initial network config via sysconf"
5 DEPENDS = "base-files devio"
6 RDEPENDS = "busybox devio"
9 SRC_URI = "file://boot/flash \
15 file://boot/udhcpc.script \
16 file://initscripts/fixfstab \
17 file://initscripts/syslog.buffer \
18 file://initscripts/syslog.file \
19 file://initscripts/syslog.network \
20 file://initscripts/zleds \
21 file://initscripts/leds_startup \
22 file://initscripts/rmrecovery \
23 file://initscripts/sysconfsetup \
24 file://initscripts/umountinitrd.sh \
25 file://initscripts/loadmodules.sh \
27 file://modulefunctions \
37 CPROGS = "${USRSBINPROGS} ${SBINPROGS}"
38 SCRIPTS = "turnup reflash leds sysconf"
39 BOOTSCRIPTS = "flash disk nfs ram kexec network udhcpc.script"
40 INITSCRIPTS = "syslog.buffer syslog.file syslog.network zleds\
41 leds_startup rmrecovery sysconfsetup umountinitrd.sh\
42 fixfstab loadmodules.sh"
44 # This just makes things easier...
51 ${CC} ${CFLAGS} -o $p $p.c
60 install -d ${D}${sysconfdir} \
61 ${D}${sysconfdir}/default \
62 ${D}${sysconfdir}/init.d \
63 ${D}${sysconfdir}/modutils \
64 ${D}${sysconfdir}/udev \
72 ln -s boot/flash ${D}/linuxrc
75 for p in ${USRSBINPROGS}
77 install -m 0755 $p ${D}${sbindir}/$p
81 install -m 0755 $p ${D}${base_sbindir}/$p
87 install -m 0755 $p ${D}${base_sbindir}/$p
92 install -m 0644 functions ${D}${sysconfdir}/default
93 install -m 0644 modulefunctions ${D}${sysconfdir}/default
94 for s in ${INITSCRIPTS}
96 install -m 0755 initscripts/$s ${D}${sysconfdir}/init.d/
101 for p in ${BOOTSCRIPTS}
103 install -m 0755 boot/$p ${D}/boot
106 # Configuration files
107 install -m 0644 conffiles ${D}${sysconfdir}/default
112 # If the package is installed on an NSLU2 $D will be empty, in that
113 # case it is normal to run 'start' and 'stop', but because the conf
114 # files installed don't actually start or stop anything this is
115 # unnecessary, so the package postfoo handling is simplified here.
116 #NB: do not use '08' (etc) for the first argument after start/stop,
117 # the value is interpreted as an octal number if there is a leading
119 pkg_postinst_slugos-init() {
121 test -n "$D" && opt="-r $D"
122 update-rc.d $opt hwclock.sh start 8 S . start 45 0 6 .
123 update-rc.d $opt umountinitrd.sh start 9 S .
124 update-rc.d $opt fixfstab start 10 S .
125 update-rc.d $opt syslog.buffer start 11 S . start 49 0 6 .
126 update-rc.d $opt sysconfsetup start 12 S .
127 update-rc.d $opt loadmodules.sh start 21 S .
128 update-rc.d $opt syslog.file start 39 S . start 47 0 6 .
129 update-rc.d $opt syslog.network start 44 S . start 39 0 6 .
130 update-rc.d $opt zleds start 99 S 1 2 3 4 5 . start 89 0 6 . stop 5 0 1 2 3 4 5 6 .
131 update-rc.d $opt rmrecovery start 99 1 2 3 4 5 .
132 # bug fix for startup
133 update-rc.d $opt leds_startup start 1 1 2 3 4 5 .
136 pkg_postrm_slugos-init() {
138 test -n "$D" && opt="-r $D"
139 for s in ${INITSCRIPTS}
141 update-rc.d $opt "$s" remove
147 # It is bad to overwrite /linuxrc as it puts the system back to
148 # a flash boot (and the flash has potentially not been upgraded!)
149 CONFFILES_${PN} = "/linuxrc ${sysconfdir}/default/conffiles"