filesystem: We don't need create /etc/{passwd,group} anymore

This commit is contained in:
Alexpux
2014-10-26 22:18:54 +03:00
parent 567fe3c476
commit 556a3fa71e
3 changed files with 8 additions and 78 deletions

View File

@@ -2,7 +2,7 @@
pkgname=filesystem
pkgver=2014.10
pkgrel=1
pkgrel=2
pkgdesc='Base filesystem'
arch=('i686' 'x86_64')
license=('GPL')
@@ -10,6 +10,7 @@ url='http://sourceforge.net/projects/msys2/'
groups=('base')
provides=('msys2-base')
replaces=('msys2-base')
install=filesystem.install
backup=('etc/fstab' 'etc/shells' 'etc/profile'
etc/bash.bash{rc,_logout} etc/skel/.bash{rc,_profile,_logout})
source=('bash.bash_logout'
@@ -53,8 +54,8 @@ md5sums=('3b95f37af49beb642c8fe174dd1f63fc'
'967f819d0dc83b552b6438de7789dfbb'
'799c5f57175ec472aa8404768981c53f'
'292ad5cdd78abac9d694cc06819a96fc'
'b316f2870e4acefc09a814e34edf6da5'
'963691cdd5d05e973a2dbcf72a33439d'
'afcd730542d7e78ca9a8027a3ed28eb4'
'f8fff1cf0b1cc8e228c422c7e0640c84'
'118fa00617d4d0b2eb337dd565d44494'
'39c1d2412eb62864c8c07cb2557c7da3'
'3b6753667b61800db1a30c614efd1ee1'
@@ -85,7 +86,7 @@ package() {
# setup /etc
install -d etc/{fstab.d,skel,profile.d,post-install}
for f in bash.bashrc bash.bash_logout fstab shells profile; do
for f in bash.bashrc bash.bash_logout fstab shells profile nsswitch.conf; do
install -m644 ${srcdir}/${f} etc/
done

View File

@@ -1,15 +1,8 @@
# Begin /etc/nsswitch.conf
passwd: files
group: files
db_enum: files
passwd: files db
group: files db
publickey: files
hosts: files dns myhostname
networks: files
protocols: files
services: files
db_enum: cache builtin
# End /etc/nsswitch.conf

View File

@@ -118,69 +118,6 @@ fi
export PATH MANPATH INFOPATH PKG_CONFIG_PATH USER TMP TEMP PRINTER HOSTNAME PS1 SHELL tmp temp
export TERM=xterm-256color
# Check to see if mkpasswd/mkgroup needs to be run try and cut down the emails
# about this on the lists!
#
# The following are the conditions under which the group name special cases
# will appear (where uid and gid are the effective user and group ids
# for the current user, and pgsid is the primary group associated with the
# SID for the current user):
# mkpasswd:
# gid is not in /etc/group
# uid is not in /etc/passwd
# passwd/group_GID_clash(<gid>/<pgsid>):
# gid is not in /etc/group
# uid is in /etc/passwd
# pgsid is in /etc/group (and does not match gid)
# mkgroup:
# gid is not in /etc/group
# uid is in /etc/passwd
# pgsid is not in /etc/group
#
# If this message keeps appearing and you are sure it's a mistake (ie, don't
# email about it!), comment out the test below.
case "$(id -ng)" in
mkpasswd )
echo "Your group is currently \"mkpasswd\". This indicates that your"
echo "gid is not in /etc/group and your uid is not in /etc/passwd."
echo
echo "The /etc/passwd (and possibly /etc/group) files should be rebuilt."
echo "See the man pages for mkpasswd and mkgroup then, for example, run"
echo
echo "mkpasswd -l [-d] > /etc/passwd"
echo "mkgroup -l [-d] > /etc/group"
echo
echo "Note that the -d switch is necessary for domain users."
;;
passwd/group_GID_clash* )
echo "Your group is currently \"passwd/group_GID_clash(gid/pgsid)\". This"
echo "indicates that your gid is not in /etc/group, but the pgsid (primary "
echo "group associated with your SID) is in /etc/group."
echo
echo "The /etc/passwd (and possibly /etc/group) files should be rebuilt."
echo "See the man pages for mkpasswd and mkgroup then, for example, run"
echo
echo "mkpasswd -l [-d] > /etc/passwd"
echo "mkgroup -l [-d] > /etc/group"
echo
echo "Note that the -d switch is necessary for domain users."
;;
mkgroup )
echo "Your group is currently \"mkgroup\". This indicates that neither"
echo "your gid nor your pgsid (primary group associated with your SID)"
echo "is in /etc/group."
echo
echo "The /etc/group (and possibly /etc/passwd) files should be rebuilt."
echo "See the man pages for mkpasswd and mkgroup then, for example, run"
echo
echo "mkpasswd -l [-d] > /etc/passwd"
echo "mkgroup -l [-d] > /etc/group"
echo
echo "Note that the -d switch is necessary for domain users."
;;
esac
if [ "$MAYBE_FIRST_START" = "true" ]; then
sh /usr/sbin/regen-info.sh
@@ -219,4 +156,3 @@ if [ "$MAYBE_FIRST_START" = "true" ]; then
echo
fi
unset MAYBE_FIRST_START