2 Commits

Author SHA1 Message Date
Jay Larson
0864a18ac2 The following changes were made:
* Added REPO to Makefile
  * usher now uses /bin/sh
  * Removed TARGET from usher
2018-03-29 12:56:55 -05:00
Jay Larson
585826bc5f Installing of login.defs, login.access, limits, and /etc/default/useradd
are now performed before attempting to run pwconv
2017-10-17 15:47:09 -05:00
2 changed files with 21 additions and 34 deletions

View File

@@ -11,11 +11,12 @@
DEPENDS = glibc,libacl,libattr DEPENDS = glibc,libacl,libattr
ARCH = x86_64 ARCH = x86_64
URL = http://pkg-shadow.alioth.debian.org/ URL = http://pkg-shadow.alioth.debian.org/
REPO = core
BRIEF = Shadow password utilities BRIEF = Shadow password utilities
DESC = This package includes the programs necessary to convert traditional \ DESC = This package includes the programs necessary to convert traditional \
V7 UNIX password files to the SVR4 shadow password format and additional \ V7 UNIX password files to the SVR4 shadow password format and additional \
tools to work with shadow passwords. tools to work with shadow passwords.
SNAPVER = 8 SNAPVER = 10
ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1) ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1)
TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n') TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n')

View File

@@ -1,4 +1,4 @@
#!/bin/bash #!/bin/sh
set -e set -e
@@ -7,41 +7,27 @@ case $1 in
exit 0 exit 0
;; ;;
postinst) postinst)
if [[ ${TARGET} ]]; then if [ ! -f /etc/login.defs ]; then
if [ ! -f ${TARGET}/etc/shadow ]; then cp /usr/share/shadow/login.defs /etc/login.defs
echo "Converting /etc/passwd to shadow for ${TARGET}" fi
chroot ${TARGET} pwconv if [ ! -f /etc/login.access ]; then
fi cp /usr/share/shadow/login.access /etc/login.access
fi
if [ ! -f ${TARGET}/etc/gshadow ]; then if [ ! -f /etc/limits ]; then
echo "Converting /etc/group to gshadow for ${TARGET}" cp /usr/share/shadow/limits /etc/limits
chroot ${TARGET} grpconv fi
fi if [ ! -f /etc/default/useradd ]; then
else cp /usr/share/shadow/useradd.default /etc/default/useradd
if [ ! -f /etc/shadow ]; then
echo "Converting /etc/passwd to shadow"
pwconv
fi
if [ ! -f /etc/gshadow ]; then
echo "Converting /etc/group to gshadow"
grpconv
fi
fi fi
if [ ! -f ${TARGET}/etc/login.defs ]; then if [ ! -f /etc/shadow ]; then
cp ${TARGET}/usr/share/shadow/login.defs ${TARGET}/etc/default/login.defs echo "Converting /etc/passwd to shadow"
pwconv
fi fi
if [ ! -f ${TARGET}/etc/login.access ]; then
cp ${TARGET}/usr/share/shadow/login.access \ if [ ! -f /etc/gshadow ]; then
${TARGET}/etc/default/login.access echo "Converting /etc/group to gshadow"
fi grpconv
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 \
${TARGET}/etc/default/useradd
fi fi
;; ;;
prerm) prerm)