From 4ce0021784a66e428bcf9548d85b325bcadc924d Mon Sep 17 00:00:00 2001 From: Jay Larson Date: Wed, 31 May 2017 09:42:02 -0500 Subject: [PATCH] Removed user configurable files from files.tar.gz - now managed by usher --- Makefile | 8 ++++++-- SNAP/usher | 13 ++++++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 15c6ce7..c236d32 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ BRIEF = Shadow password utilities DESC = This package includes the programs necessary to convert traditional \ V7 UNIX password files to the SVR4 shadow password format and additional \ tools to work with shadow passwords. -SNAPVER = 7 +SNAPVER = 8 ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1) TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n') @@ -68,7 +68,11 @@ $(ROOT): $(SRCDIR)/src/vipw @install -v -d -m 755 $(ROOT)/usr/share/shadow && \ install -v -m 644 $(PWD)/SNAP/useradd.default \ - $(ROOT)/usr/share/shadow/useradd.default + $(ROOT)/usr/share/shadow/useradd.default && \ + rm -v $(ROOT)/etc/default/useradd && \ + mv -v $(ROOT)/etc/{login.{defs,access},limits} \ + $(ROOT)/usr/share/shadow && \ + rmdir $(ROOT)/etc/default $(ROOT)/etc clean: @rm -rvf $(ROOT) \ diff --git a/SNAP/usher b/SNAP/usher index ed38e80..71f1909 100755 --- a/SNAP/usher +++ b/SNAP/usher @@ -29,8 +29,19 @@ case $1 in fi fi + if [ ! -f ${TARGET}/etc/login.defs ]; then + cp ${TARGET}/usr/share/shadow/login.defs ${TARGET}/etc/default/login.defs + fi + if [ ! -f ${TARGET}/etc/login.access ]; then + cp ${TARGET}/usr/share/shadow/login.access \ + ${TARGET}/etc/default/login.access + fi + if [ ! -f ${TARGET}/etc/limits ]; then + cp ${TARGET}/usr/share/shadow/limits ${TARGET}/etc/limits + fi if [ ! -f ${TARGET}/etc/default/useradd ]; then - cp ${TARGET}/usr/share/shadow/useradd.default /etc/default/useradd + cp ${TARGET}/usr/share/shadow/useradd.default \ + ${TARGET}/etc/default/useradd fi ;; prerm)