Added usher to run pwconv and grpconv if necessary
This commit is contained in:
2
Makefile
2
Makefile
@@ -14,7 +14,7 @@ URL = http://pkg-shadow.alioth.debian.org/
|
|||||||
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 = sr0
|
SNAPVER = sr1
|
||||||
|
|
||||||
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')
|
||||||
|
|||||||
34
SNAP/usher
Executable file
34
SNAP/usher
Executable file
@@ -0,0 +1,34 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
preinst)
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
postinst)
|
||||||
|
if [[ ${TARGET} ]]; then
|
||||||
|
if [ ! -f ${TARGET}/etc/shadow ]; then
|
||||||
|
chroot ${TARGET} pwconv
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f ${TARGET}/etc/gshadow ]; then
|
||||||
|
chroot ${TARGET} grpconv
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [ ! -f /etc/shadow ]; then
|
||||||
|
pwconv
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f /etc/gshadow ]; then
|
||||||
|
grpconv
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
prerm)
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
postrm)
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
Reference in New Issue
Block a user