wok-next rev 2392
postgresql: fix uid/gid for postgres
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Mar 10 09:04:33 2009 +0000 (2009-03-10) |
parents | 30a2f8a2ce99 |
children | eff344464290 |
files | postgresql/receipt |
line diff
1.1 --- a/postgresql/receipt Tue Mar 10 09:02:15 2009 +0000 1.2 +++ b/postgresql/receipt Tue Mar 10 09:04:33 2009 +0000 1.3 @@ -58,8 +58,10 @@ 1.4 echo -n "Adding user postgres..." 1.5 chroot $1/ adduser postgres -D -H -h /var/lib/pgsql 1.6 # ensure not to overload tux user 1.7 - sed -i 's/^postgres:x:1000:1000:/postgres:x:1001:1001:/' $1/etc/passwd 1.8 - sed -i 's/^postgres:x:1000:/postgres:x:1001:/' $1/etc/group 1.9 + i=1100 1.10 + while grep -q ":$i:" $1/etc/passwd ; do i=$(( $i + 1 )); done 1.11 + sed -i "s/^postgres:x:1000:1000:/postgres:x:$i:$i:/" $1/etc/passwd 1.12 + sed -i "s/^postgres:x:1000:/postgres:x:$i:/" $1/etc/group 1.13 status 1.14 fi 1.15 # addgroup postgres if needed