From 556a3fa71ea0ba5c601ccfa79727f463e7cb53ff Mon Sep 17 00:00:00 2001 From: Alexpux Date: Sun, 26 Oct 2014 22:18:54 +0300 Subject: [PATCH] filesystem: We don't need create /etc/{passwd,group} anymore --- filesystem/PKGBUILD | 9 +++--- filesystem/nsswitch.conf | 13 ++------ filesystem/profile | 64 ---------------------------------------- 3 files changed, 8 insertions(+), 78 deletions(-) diff --git a/filesystem/PKGBUILD b/filesystem/PKGBUILD index 042ce93b..8c128cba 100644 --- a/filesystem/PKGBUILD +++ b/filesystem/PKGBUILD @@ -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 diff --git a/filesystem/nsswitch.conf b/filesystem/nsswitch.conf index 2c378b2a..d15becdb 100644 --- a/filesystem/nsswitch.conf +++ b/filesystem/nsswitch.conf @@ -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 diff --git a/filesystem/profile b/filesystem/profile index d45b17ea..c4b1c1bf 100644 --- a/filesystem/profile +++ b/filesystem/profile @@ -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 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 -