On 1/6/08, Jonas Karlsson <[EMAIL PROTECTED]> wrote:
> 2008/1/7, Lucas C. Villa Real <[EMAIL PROTECTED]>:
> I'd still want a warning if any action fails, as it could be critical
> for the operation of the application that a group or user exist. Maybe
> grep group/passwd for the group/user to erify that it was really
> added?
>

Checking group/passwd is a good check.  How about SymlinkProgram
exiting in a failure?  Or write an error log (R/Errors??) in case the
error msg scrolls off screan,  then the admin can fix the problem by
hand.  bloat bloat bloat

> What does the code below do?
> +      for num in `cat "$1" | cut -d: -f3 | sort -n`
> +      do
> +         [ $num -ge 100 -a $num -lt 999 ] && next=$num
> +      done
> +      if [ "$next" ]
> +      then
> +         let next=next+1
> +         echo "$next"
> +         return
> +      fi
>
> it feels as if it only loops existing gids/uids and returns the last,
> but not looking for a available slot. Then if a gid/uid is found that
> (+1) is returned, which means that the code below that, that tries to
> find next available slot, is never reached.
>

Exactly,  the idea is max+1 is more orderly.  Most recent is highest.
But the fear is someone may add an entry by hand (say 999).  In that
case, it falls back to first available slot.


-- 
Carlo J. Calica
_______________________________________________
gobolinux-devel mailing list
gobolinux-devel@lists.gobolinux.org
http://lists.gobolinux.org/mailman/listinfo/gobolinux-devel

Reply via email to