From e6a74e48094e453596edc0c555503e72495a690c Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Mon, 21 Sep 2009 01:21:25 +0200 Subject: [PATCH] config/path: add scrips to add user and groups --- config/path | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/config/path b/config/path index f89a9b9404..926f79df37 100644 --- a/config/path +++ b/config/path @@ -218,6 +218,24 @@ xorg_drv_configure_prepend() { done } +add_user() { + # Usage: add_user "username" "password" "userid" "groupid" "description" "home" "shell" + mkdir -p ${INSTALL}/etc + touch ${INSTALL}/etc/passwd + if [ -z "`grep "$1:" ${INSTALL}/etc/passwd`" ]; then + echo "$1:$2:$3:$4:$5:$6:$7" >> ${INSTALL}/etc/passwd + fi +} + +add_group() { + # Usage: add_group "groupname" "groupid" + mkdir -p ${INSTALL}/etc + touch ${INSTALL}/etc/group + if [ -z "`grep "$1:" ${INSTALL}/etc/group`" ]; then + echo "$1:x:$2:" >> ${INSTALL}/etc/group + fi +} + INCLUDED_LANGS="en $MENU_LANG $INCLUDED_LANGS" # read personal options if available