123456789101112131415161718192021222324252627282930313233343536 |
- diff --git a/UpdateRootfs.sh.in b/UpdateRootfs.sh.in
- index 04618dcbb9..e5247ab42a 100644
- --- a/UpdateRootfs.sh.in
- +++ b/UpdateRootfs.sh.in
- @@ -319,12 +319,13 @@ fi
- GID_NOGROUP=`awk -F\: '/nogroup/ {print $3}' $GFA_PREFIX/etc/group`
- if [ -z "$GID_NOGROUP" ]; then
- # addgroup -S -g 65534 nogroup
- - echo "nogroup:x:65534:" >> $GFA_PREFIX/etc/group
- + GID_NOGROUP=65534
- + echo "nogroup:x:${GID_NOUGROUP}:" >> $GFA_PREFIX/etc/group
- fi
- #--create missing users for mysql,
- if [ -z `awk -F\: '/mysql/ {print $3}' $GFA_PREFIX/etc/passwd` ]; then
- UID_MY=`awk -F: '{uid[$3]=1}END{for(x=1000; x<=1500; x++) {if(uid[x] != ""){}else{print x; exit;}}}' $GFA_PREFIX/etc/passwd`
- - echo "mysql:x:$UID_MY:65534:MySQL daemon:/var/mysql:/bin/false" >> $GFA_PREFIX/etc/passwd
- + echo "mysql:x:$UID_MY:${GID_NOUGROUP}:MySQL daemon:/var/mysql:/bin/false" >> $GFA_PREFIX/etc/passwd
- fi
- #--create missing users for postgresql,
- if [ -z `awk -F\: '/postgres/ {print $3}' $GFA_PREFIX/etc/passwd` ]; then
- @@ -337,8 +338,13 @@ if [ -z `awk -F\: '/postgres/ {print $3}' $GFA_PREFIX/etc/passwd` ]; then
- echo "postgres:x:$UID_PG:$GID_PG:PostgreSQL Server:/var/lib/pgsql:/bin/sh" >> $GFA_PREFIX/etc/passwd
- fi
- #------------------
- -chown -Rv mysql:nogroup $GFA_PREFIX/var/mysql
- -chown -Rv postgres:postgres $GFA_PREFIX/var/lib/pgsql
- +UID_MY=`awk -F\: '/mysql/ {print $3}' $GFA_PREFIX/etc/passwd`
- +UID_PG=`awk -F\: '/postgres/ {print $3}' $GFA_PREFIX/etc/passwd`
- +GID_PG=`awk -F\: '/postgres/ {print $3}' $GFA_PREFIX/etc/group`
- +GID_NOGROUP=`awk -F\: '/nogroup/ {print $3}' $GFA_PREFIX/etc/group`
- +
- +chown -Rv ${UID_MY}:${GID_NOGROUP} $GFA_PREFIX/var/mysql
- +chown -Rv ${UID_PG}:${GID_PG} $GFA_PREFIX/var/lib/pgsql
- #==============================================================================
- # Get Graphics resolution and set dtb to the right resolution
- BASEBOARD=`cat /tmp/BASEBOARD`
|