diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-core/busybox/busybox.inc | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc index 55f056c4c0..9f2d64c093 100644 --- a/meta/recipes-core/busybox/busybox.inc +++ b/meta/recipes-core/busybox/busybox.inc | |||
@@ -12,22 +12,25 @@ SECTION = "base" | |||
12 | PRIORITY = "required" | 12 | PRIORITY = "required" |
13 | 13 | ||
14 | export EXTRA_CFLAGS = "${CFLAGS}" | 14 | export EXTRA_CFLAGS = "${CFLAGS}" |
15 | PACKAGES =+ "${PN}-httpd ${PN}-udhcpd" | 15 | PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog" |
16 | 16 | ||
17 | FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www" | 17 | FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www" |
18 | FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog.conf*" | ||
18 | FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd" | 19 | FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd" |
20 | FILES_${PN}-udhcpc = "${sysconfdir}/udhcpc.d ${datadir}/udhcpc ${sysconfdir}/init.d/busybox-udhcpc" | ||
19 | 21 | ||
20 | FILES_${PN} += "${datadir}/udhcpc" | 22 | INITSCRIPT_PACKAGES = "${PN}-httpd ${PN}-syslog ${PN}-udhcpd ${PN}-udhcpc" |
21 | FILES_${PN} += "${sysconfdir}/init.d/busybox-udhcpc" | ||
22 | 23 | ||
23 | INITSCRIPT_PACKAGES = "${PN} ${PN}-httpd ${PN}-udhcpd" | ||
24 | INITSCRIPT_NAME_${PN}-httpd = "busybox-httpd" | 24 | INITSCRIPT_NAME_${PN}-httpd = "busybox-httpd" |
25 | INITSCRIPT_NAME_${PN}-syslog = "syslog" | ||
25 | INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd" | 26 | INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd" |
26 | INITSCRIPT_NAME_${PN} = "syslog busybox-udhcpc" | 27 | INITSCRIPT_NAME_${PN}-udhcpc = "busybox-udhcpc" |
27 | CONFFILES_${PN} = "${sysconfdir}/syslog.conf.${PN}" | 28 | CONFFILES_${PN}-syslog = "${sysconfdir}/syslog.conf.${PN}" |
29 | |||
30 | RRECOMMENDS_${PN} = "${PN}-syslog ${PN}-udhcpc" | ||
28 | 31 | ||
29 | # This disables the syslog startup links in slugos (see slugos-init) | 32 | # This disables the syslog startup links in slugos (see slugos-init) |
30 | INITSCRIPT_PARAMS_${PN}_slugos = "start 20 ." | 33 | INITSCRIPT_PARAMS_${PN}-syslog_slugos = "start 20 ." |
31 | 34 | ||
32 | inherit cml1 update-rc.d | 35 | inherit cml1 update-rc.d |
33 | 36 | ||
@@ -116,7 +119,9 @@ pkg_postinst_${PN} () { | |||
116 | 119 | ||
117 | # This adds the links, remember that this has to work when building an image too, hence the $D | 120 | # This adds the links, remember that this has to work when building an image too, hence the $D |
118 | while read link; do case "$link" in /*/*/*) to="../../bin/busybox";; /bin/*) to="busybox";; /*/*) to="../bin/busybox";; esac; bn=`basename $link`; update-alternatives --install $link $bn $to 50; done <$D/etc/busybox.links | 121 | while read link; do case "$link" in /*/*/*) to="../../bin/busybox";; /bin/*) to="busybox";; /*/*) to="../bin/busybox";; esac; bn=`basename $link`; update-alternatives --install $link $bn $to 50; done <$D/etc/busybox.links |
122 | } | ||
119 | 123 | ||
124 | pkg_postinst_${PN}-syslog () { | ||
120 | update-alternatives --install ${sysconfdir}/init.d/syslog syslog-init syslog.${PN} 50 | 125 | update-alternatives --install ${sysconfdir}/init.d/syslog syslog-init syslog.${PN} 50 |
121 | update-alternatives --install ${sysconfdir}/syslog.conf syslog-conf syslog.conf.${PN} 50 | 126 | update-alternatives --install ${sysconfdir}/syslog.conf syslog-conf syslog.conf.${PN} 50 |
122 | } | 127 | } |
@@ -150,7 +155,9 @@ pkg_prerm_${PN} () { | |||
150 | bn=`basename $link` | 155 | bn=`basename $link` |
151 | sh /usr/bin/update-alternatives --remove $bn $to | 156 | sh /usr/bin/update-alternatives --remove $bn $to |
152 | done </etc/busybox.links | 157 | done </etc/busybox.links |
158 | } | ||
153 | 159 | ||
160 | pkg_prerm_${PN}-syslog () { | ||
154 | # remove syslog | 161 | # remove syslog |
155 | if test "x$D" = "x"; then | 162 | if test "x$D" = "x"; then |
156 | if test "$1" = "upgrade" -o "$1" = "remove"; then | 163 | if test "$1" = "upgrade" -o "$1" = "remove"; then |