diff options
Diffstat (limited to 'recipes/busybox')
-rw-r--r-- | recipes/busybox/busybox.inc | 28 | ||||
-rw-r--r-- | recipes/busybox/busybox_1.1x.inc | 2 | ||||
-rw-r--r-- | recipes/busybox/files/passwd | 11 | ||||
-rw-r--r-- | recipes/busybox/files/shadow | 11 |
4 files changed, 52 insertions, 0 deletions
diff --git a/recipes/busybox/busybox.inc b/recipes/busybox/busybox.inc index 29893dabb8..59653e011d 100644 --- a/recipes/busybox/busybox.inc +++ b/recipes/busybox/busybox.inc @@ -23,6 +23,8 @@ SRC_URI = "\ file://hwclock-default \ file://ifupdown-spurious-environ.patch \ file://mount.busybox \ + file://passwd \ + file://shadow \ file://syslog \ file://syslog.conf \ file://udhcpscript.patch \ @@ -34,6 +36,7 @@ SRC_URI_append_nylon = " file://xargs-double-size.patch" export EXTRA_CFLAGS = "${CFLAGS}" EXTRA_OEMAKE_append = " CROSS=${HOST_PREFIX}" PACKAGES =+ "${PN}-mountall ${PN}-httpd ${PN}-syslog ${PN}-udhcpd" +PACKAGES =+ "${PN}-passwd ${PN}-shadow" # We need this RRECOMMENDS_${PN} because libc dlopens libgcc # and shlib mechanism can not detect it because its not @@ -47,6 +50,8 @@ RDEPENDS_${PN} += "${PN}-mountall" RRECOMMENDS_${PN} += "libgcc ${PN}-syslog" FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www" +FILES_${PN}-passwd = "${sysconfdir}/passwd.${PN}" +FILES_${PN}-shadow = "${sysconfdir}/shadow.${PN}" FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog.${PN} ${sysconfdir}/syslog.conf" FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd" @@ -64,6 +69,8 @@ CONFFILES_${PN}-syslog = "${sysconfdir}/syslog.conf" INITSCRIPT_PARAMS_${PN}-syslog_slugos = "start 20 ." RDEPENDS_${PN}-httpd += "${PN}" +RDEPENDS_${PN}-passwd += "${PN}" +RDEPENDS_${PN}-shadow += "${PN}-passwd" RDEPENDS_${PN}-syslog += "${PN}" RDEPENDS_${PN}-udhcpd += "${PN}" @@ -177,6 +184,12 @@ do_install () { fi fi + if grep -q "CONFIG_PASSWD=y" ${WORKDIR}/defconfig; then + install -m 0644 ${WORKDIR}/passwd ${D}${sysconfdir}/passwd.${PN} + if grep -q "CONFIG_FEATURE_SHADOWPASSWDS=y" ${WORKDIR}/defconfig; then + install -m 0640 ${WORKDIR}/shadow ${D}${sysconfdir}/shadow.${PN} + fi + fi if grep -q "CONFIG_SYSLOGD=y" ${WORKDIR}/defconfig; then install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/syslog.${PN} install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/ @@ -260,6 +273,21 @@ pkg_prerm_${PN}-mountall () { update-alternatives --remove default_mountall mountall.${PN} } +pkg_postinst_${PN}-passwd () { + update-alternatives --install ${sysconfdir}/passwd default_passwd passwd.${PN} 50 +} +pkg_prerm_${PN}-passwd () { + update-alternatives --remove default_passwd passwd.${PN} +} + +pkg_postinst_${PN}-shadow () { + update-alternatives --install ${sysconfdir}/shadow default_shadow shadow.${PN} 50 +} +pkg_prerm_${PN}-shadow () { + update-alternatives --remove default_shadow shadow.${PN} +} + + pkg_postinst_${PN}-syslog () { update-alternatives --install ${sysconfdir}/init.d/syslog syslog-init syslog.${PN} 50 diff --git a/recipes/busybox/busybox_1.1x.inc b/recipes/busybox/busybox_1.1x.inc index 079c784f60..4dbc3d94a6 100644 --- a/recipes/busybox/busybox_1.1x.inc +++ b/recipes/busybox/busybox_1.1x.inc @@ -17,6 +17,8 @@ SRC_URI = "\ file://hwclock-default \ file://mount.busybox \ file://mountall \ + file://passwd \ + file://shadow \ file://syslog \ file://syslog.conf \ file://umount.busybox \ diff --git a/recipes/busybox/files/passwd b/recipes/busybox/files/passwd new file mode 100644 index 0000000000..64c9ab6b90 --- /dev/null +++ b/recipes/busybox/files/passwd @@ -0,0 +1,11 @@ +root:x:0:0:root:/root:/bin/sh +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +man:x:6:12:man:/var/cache/man:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh diff --git a/recipes/busybox/files/shadow b/recipes/busybox/files/shadow new file mode 100644 index 0000000000..25df693b0a --- /dev/null +++ b/recipes/busybox/files/shadow @@ -0,0 +1,11 @@ +root::14741:0:99999:7::: +daemon:*:14741:0:99999:7::: +bin:*:14741:0:99999:7::: +sys:*:14741:0:99999:7::: +sync:*:14741:0:99999:7::: +man:*:14741:0:99999:7::: +mail:*:14741:0:99999:7::: +www-data:*:14741:0:99999:7::: +backup:*:14741:0:99999:7::: +irc:*:14741:0:99999:7::: +nobody:*:14741:0:99999:7::: |