Subversion Repositories livecd

Rev

Rev 169 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 169 Rev 172
Line 483... Line 483...
483
 
483
 
484
### create local user, if "nolocal" is not set 
484
### create local user, if "nolocal" is not set 
485
if [ ! $NOLOCAL ]; then
485
if [ ! $NOLOCAL ]; then
486
 
486
 
487
    user=$LOCALUSER
487
    user=$LOCALUSER
488
    # execute useradd/groupadd twice, to make it work (don't know why)
-
 
489
    if [ $PSI ] && [ ! $NOADMIN ]; then
488
    if [ $PSI ] && [ ! $NOADMIN ]; then
490
	groupdel $user 2>/dev/null
-
 
491
	groupadd $user 2>/dev/null
489
	groupadd $user   2>/dev/null
492
	groupdel $user 2>/dev/null
-
 
493
	groupadd $user
-
 
494
	
-
 
495
	userdel -r $user                  2>/dev/null
-
 
496
	useradd -G $LocalAdminGroup $user 2>/dev/null
-
 
497
	userdel -r $user                  2>/dev/null
-
 
498
        # add user to fuse group ?
490
        # add user to fuse group ?
499
	grep -q "^fuse:" /etc/group
491
	grep -q "^fuse:" /etc/group
500
	if [ "$?" = "0" ]; then
492
	if [ "$?" = "0" ]; then
501
	    useradd -g $user -G ${LocalAdminGroup},fuse $user
493
	    useradd -g $user -G ${LocalAdminGroup},fuse $user  2>/dev/null
502
	else
494
	else
503
	    useradd -g $user -G ${LocalAdminGroup} $user
495
	    useradd -g $user -G ${LocalAdminGroup} $user       2>/dev/null
504
	fi
496
	fi
505
    else
497
    else
506
	userdel -r $user 2>/dev/null
-
 
507
	useradd $user    2>/dev/null
498
	groupadd $user  2>/dev/null
508
	userdel -r $user 2>/dev/null
-
 
509
	grep -q "^fuse:" /etc/group
-
 
510
        # add user to fuse group ?
499
        # add user to fuse group ?
-
 
500
	grep -q "^fuse:" /etc/group
511
	if [ "$?" = "0" ]; then
501
	if [ "$?" = "0" ]; then
512
	    useradd -G fuse $user
502
	    useradd -g $user -G fuse $user  2>/dev/null
513
	else
503
	else
514
	    useradd $user
504
	    useradd -g $user $user          2>/dev/null
515
	fi
505
	fi
516
    fi
506
    fi
517
 
507
 
518
fi
508
fi
519
 
509