4 echo "Usage: sudo mem_add <name> <uid>"
5 echo " Create the AlternC account <name> having uid number <uid>"
12 if [[ ! "$name" =~ ^([a-z0-9]+)$ ]] ; then
13 echo "Account name is incorrect."
18 if [[ ! "$uid" =~ ^([0-9]+)$ ]] ; then
19 echo "uid is incorrect."
23 if [[ ! "$(id -u)" == "0" ]] ; then
24 echo "please launch mem_add as root (or using sudo)"
28 # Get the vars and some functions
29 source /usr/lib/alternc/functions.sh
30 target="$(get_html_path_by_name "$name")"
34 /usr/lib/alternc/fixperms.sh -u "$uid"