1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-24 05:34:36 +02:00

[package] base-files: make user_add() populate the shadow db as well

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32063 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
jow 2012-06-05 17:40:32 +00:00
parent aa44be4505
commit 52deeb5d9c
2 changed files with 2 additions and 1 deletions

View File

@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
include $(INCLUDE_DIR)/version.mk
PKG_NAME:=base-files
PKG_RELEASE:=108
PKG_RELEASE:=109
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
PKG_BUILD_DEPENDS:=opkg/host

View File

@ -302,6 +302,7 @@ user_add() {
[ -f "${IPKG_INSTROOT}/etc/passwd" ] || return 1
[ -n "$IPKG_INSTROOT" ] || lock /var/lock/passwd
echo "${name}:x:${uid}:${gid}:${desc}:${home}:${shell}" >> ${IPKG_INSTROOT}/etc/passwd
echo "${name}:x:0:0:99999:7:::" >> ${IPKG_INSTROOT}/etc/shadow
rc=$?
[ -n "$IPKG_INSTROOT" ] || lock -u /var/lock/passwd
return $rc