filesystem: Completely remove /etc/passwd generation
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
maybe_create_passwd ()
|
||||
{
|
||||
# Create default /etc/passwd and /etc/group files
|
||||
local created_passwd=no
|
||||
local created_group=no
|
||||
|
||||
if [ ! -e /etc/passwd -a ! -L /etc/passwd ] ; then
|
||||
mkpasswd.exe -l -c > /etc/passwd
|
||||
chmod 644 /etc/passwd
|
||||
created_passwd=yes
|
||||
MAYBE_FIRST_START=true
|
||||
fi
|
||||
|
||||
if [ ! -e /etc/group -a ! -L /etc/group ] ; then
|
||||
mkgroup.exe -l -c > /etc/group
|
||||
chmod 644 /etc/group
|
||||
created_group=yes
|
||||
MAYBE_FIRST_START=true
|
||||
fi
|
||||
|
||||
cp -fp /etc/group /tmp/group.mkgroup && \
|
||||
( [ -w /etc/group ] || chmod --silent a+w /etc/group ; ) && \
|
||||
echo "root:S-1-5-32-544:0:" > /etc/group && \
|
||||
sed -e '/root:S-1-5-32-544:0:/d' /tmp/group.mkgroup >> /etc/group && \
|
||||
chmod --silent --reference=/etc/passwd /etc/group
|
||||
rm -f /tmp/group.mkgroup
|
||||
|
||||
# Deferred to be sure root group entry exists
|
||||
[ "$created_passwd" = "yes" ] && chgrp --silent root /etc/passwd
|
||||
[ "$created_group" = "yes" ] && chgrp --silent root /etc/group
|
||||
}
|
||||
|
||||
maybe_create_passwd
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
pkgname=filesystem
|
||||
pkgver=2014.10
|
||||
pkgrel=2
|
||||
pkgrel=3
|
||||
pkgdesc='Base filesystem'
|
||||
arch=('i686' 'x86_64')
|
||||
license=('GPL')
|
||||
@@ -37,7 +37,6 @@ source=('bash.bash_logout'
|
||||
01-devices.post
|
||||
02-fstab.post
|
||||
03-mtab.post
|
||||
04-passwd.post
|
||||
05-home-dir.post
|
||||
06-windows-files.post)
|
||||
md5sums=('3b95f37af49beb642c8fe174dd1f63fc'
|
||||
@@ -64,7 +63,6 @@ md5sums=('3b95f37af49beb642c8fe174dd1f63fc'
|
||||
'7df6a2d0c05e49bf9224fdfbc240a730'
|
||||
'92143d4dc539ee6344c81489b640a90c'
|
||||
'c3c57aa78cdb6cd5dea1e51b12cdbc1d'
|
||||
'619c7a402a7590e0f7aac994f3c15e54'
|
||||
'b80fcdfaa3942a09d473286b8397114c'
|
||||
'fef301aa9d3357ca034fbb3adf77f0f0')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user