{
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
}
{
arguments="${*}"
- # The last argument is the username
+ # The last argument is the user name
while [ $# -ne 0 ]; do
username=${*}
shift
# -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
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}