All pastes #25189 Raw Edit

Miscellany

public text v1 · immutable
#25189 ·published 2005-10-11 03:35 UTC
rendered paste body
      if [ "$(OSARCH)" == "Darwin" ]; then \
                if [ "`nireport / /groups name gid | $(GREP) $(OPBXRUNGROUP)`" = "" ]; then \
                        gidcount=`nireport / /groups gid | sort -n | tail -n 1`; \
                        gidcount=`echo $gidcount + 1 | bc`; \
                        if [ $gidcount -lt 250 ]; then \
                                gidcount=250; \
                        fi; \
                        niutil -create / /groups/$(OPBXRUNGROUP); \
                        niutil -createprop / /groups/$(OPBXRUNGROUP) gid $gidcount; \
                fi; \ 
                if [ "`nireport / /users name uid  |grep $(OPBXRUNUSER)`" = "" ]; then \
                        gidcount=`nireport / /groups gid | sort -n | tail -n 1`; \
                        gidcount=`echo $gidcount + 1 | bc`; \
                        if [ $gidcount -lt 250 ]; then \
                                gidcount=250; \
                        fi; \
                        niutil -create / /users/$(OPBXRUNUSER); \
                        niutil -createprop / /users/$(OPBXRUNUSER) gid 201; \
                        niutil -createprop / /users/$(OPBXRUNUSER) uid 502; \
                        niutil -createprop / /users/$(OPBXRUNUSER) home $(DESTDIR)$(OPBXVARRUNDIR); \
                fi; \
        else \
                $(GROUPADDBIN) -f $(OPBXRUNGROUP); \
                if [ "`cat /etc/passwd | $(GREP) -e '^$(OPBXRUNUSER):'`" = "" ]; then \
                        $(USERADDBIN) -d $(DESTDIR)$(OPBXVARRUNDIR) -s /bin/false  -g $(OPBXRUNGROUP) -G $(OPBXRUNGROUP) $(OPBXRUNUSER) ; \
                fi; \
        fi