Make installers silent when run inside packages.

This commit is contained in:
Adam Ierymenko 2016-02-24 15:23:49 -08:00
parent 7b5c1696eb
commit 3fe60615df
2 changed files with 4 additions and 4 deletions

View File

@ -21,11 +21,11 @@ mkdir -p /var/lib/zerotier-one/updates.d
%post
chmod 0755 /var/lib/zerotier-one/updates.d/__INSTALLER__
/var/lib/zerotier-one/updates.d/__INSTALLER__
/var/lib/zerotier-one/updates.d/__INSTALLER__ >>/dev/null 2>&1
%preun
if [ "$1" -lt 1 ]; then
/var/lib/zerotier-one/uninstall.sh
/var/lib/zerotier-one/uninstall.sh >>/dev/null 2>&1
fi
%clean

View File

@ -91,14 +91,14 @@ case "$system" in
rm -f "${debfolder}/postinst" "${debfolder}/prerm"
echo '#!/bin/bash' >${debfolder}/postinst
echo "/var/lib/zerotier-one/updates.d/${targ}" >>${debfolder}/postinst
echo "/var/lib/zerotier-one/updates.d/${targ} >>/dev/null 2>&1" >>${debfolder}/postinst
echo "/bin/rm -f /var/lib/zerotier-one/updates.d/*" >>${debfolder}/postinst
chmod a+x ${debfolder}/postinst
echo '#!/bin/bash' >${debfolder}/prerm
echo 'export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin' >>${debfolder}/prerm
echo 'if [ "$1" != "upgrade" ]; then' >>${debfolder}/prerm
echo ' /var/lib/zerotier-one/uninstall.sh' >>${debfolder}/prerm
echo ' /var/lib/zerotier-one/uninstall.sh >>/dev/null 2>&1' >>${debfolder}/prerm
echo 'fi' >>${debfolder}/prerm
chmod a+x ${debfolder}/prerm