X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=functions;h=89230b9afcffb510a4338dd60240f80789ad403c;hb=58a778d599dc76a8fff2d9fee9a6714344d5e1dc;hp=17dcbdb9fc1363c76388f17b56016e48cb286c09;hpb=9e3f8101a7e4d974db8e9afeb9c90c13a43ae8d7;p=hvlinux.git diff --git a/functions b/functions index 17dcbdb..89230b9 100644 --- a/functions +++ b/functions @@ -496,23 +496,14 @@ hv_groupadd() { arguments=${*} - set +e - + # The last argument is the group name while [ $# -ne 0 ]; do - last_argument=${*} + groupname=${*} shift done - groupadd ${arguments} - error=$? - - set -e - - if [ ${error} -eq 0 -o ${error} -eq 9 ]; then - # 9 means the group already exists - return ${EXIT_SUCCESS} - else - exit ${EXIT_FAILURE} + if ! cat /etc/group | egrep "^${groupname}:" 1> /dev/null 2>&1; then + groupadd ${arguments} fi } @@ -522,7 +513,7 @@ hv_useradd() { arguments="${*}" - # The last argument is the username + # The last argument is the user name while [ $# -ne 0 ]; do username=${*} shift @@ -753,9 +744,9 @@ ipkg_display_build_infos() # -l Unique identification label in 'install.log' # (default is package name and version) # -m Installation mode: -# ac Standard autoconf package, build in separate dir -# acnb Standard autoconf package, building in source dir -# nb No autoconf (configure) +# ac Standard autoconf package, build in separate dir (default) +# acnb Standard autoconf package, build in source dir +# noac No autoconf (configure) # gnome # xorg # pm @@ -847,7 +838,7 @@ ipkg() exec > ${PACKAGE_LOG} 2>&1 # Sourcing standard ac script. - source ${SCRDIR}/../functions-ac + source ${SCRDIR}/../functions-ipkg source ${SCRDIR}/${DEFAULT_IPKG_SCRIPT} ipkg_script ${ALT_SCRIPT_NAME}