The following changes were made:
* removed usher * various cleanup in output * corrected issues with usher() in Package.pm, now using fork()/exec() * added snapinstall * made virtfs() more robust, will still attempt if fails * made strip a little more thoughtful in Makefile.snaplinux
This commit is contained in:
43
SNAP/usher
43
SNAP/usher
@@ -1,43 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
case $1 in
|
||||
preinst)
|
||||
exit 0
|
||||
;;
|
||||
postinst)
|
||||
setpass=`cat ${TARGET}/etc/shadow|grep ^root|awk -F':' '{print $2}'`
|
||||
|
||||
if [ "$setpass" == 'SETPASS' ]; then
|
||||
echo "Setting root password"
|
||||
|
||||
if [[ ${TARGET} ]]; then
|
||||
if ! mountpoint ${TARGET}/dev; then
|
||||
mount -o ro -t devtmpfs devtmpfs ${TARGET}/dev
|
||||
chroot ${TARGET} passwd root
|
||||
umount ${TARGET}/dev
|
||||
else
|
||||
chroot ${TARGET} passwd root
|
||||
fi
|
||||
else
|
||||
passwd root
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Refreshing snap"
|
||||
|
||||
if [[ ${TARGET} ]]; then
|
||||
chroot ${TARGET} snap refresh
|
||||
else
|
||||
snap refresh
|
||||
fi
|
||||
exit 0
|
||||
;;
|
||||
prerm)
|
||||
exit 0
|
||||
;;
|
||||
postrm)
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user