The following changes were made:
* Added REPO to Makefile * usher now uses /bin/sh * Removed TARGET from usher
This commit is contained in:
46
SNAP/usher
46
SNAP/usher
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
@@ -7,41 +7,27 @@ case $1 in
|
||||
exit 0
|
||||
;;
|
||||
postinst)
|
||||
if [ ! -f ${TARGET}/etc/login.defs ]; then
|
||||
cp ${TARGET}/usr/share/shadow/login.defs ${TARGET}/etc/login.defs
|
||||
if [ ! -f /etc/login.defs ]; then
|
||||
cp /usr/share/shadow/login.defs /etc/login.defs
|
||||
fi
|
||||
if [ ! -f ${TARGET}/etc/login.access ]; then
|
||||
cp ${TARGET}/usr/share/shadow/login.access \
|
||||
${TARGET}/etc/login.access
|
||||
if [ ! -f /etc/login.access ]; then
|
||||
cp /usr/share/shadow/login.access /etc/login.access
|
||||
fi
|
||||
if [ ! -f ${TARGET}/etc/limits ]; then
|
||||
cp ${TARGET}/usr/share/shadow/limits ${TARGET}/etc/limits
|
||||
if [ ! -f /etc/limits ]; then
|
||||
cp /usr/share/shadow/limits /etc/limits
|
||||
fi
|
||||
if [ ! -f ${TARGET}/etc/default/useradd ]; then
|
||||
cp ${TARGET}/usr/share/shadow/useradd.default \
|
||||
${TARGET}/etc/default/useradd
|
||||
if [ ! -f /etc/default/useradd ]; then
|
||||
cp /usr/share/shadow/useradd.default /etc/default/useradd
|
||||
fi
|
||||
|
||||
if [[ ${TARGET} ]]; then
|
||||
if [ ! -f ${TARGET}/etc/shadow ]; then
|
||||
echo "Converting /etc/passwd to shadow for ${TARGET}"
|
||||
chroot ${TARGET} pwconv
|
||||
fi
|
||||
if [ ! -f /etc/shadow ]; then
|
||||
echo "Converting /etc/passwd to shadow"
|
||||
pwconv
|
||||
fi
|
||||
|
||||
if [ ! -f ${TARGET}/etc/gshadow ]; then
|
||||
echo "Converting /etc/group to gshadow for ${TARGET}"
|
||||
chroot ${TARGET} grpconv
|
||||
fi
|
||||
else
|
||||
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
|
||||
if [ ! -f /etc/gshadow ]; then
|
||||
echo "Converting /etc/group to gshadow"
|
||||
grpconv
|
||||
fi
|
||||
;;
|
||||
prerm)
|
||||
|
||||
Reference in New Issue
Block a user