From 3fe60615dfa0de52bcd6304ce93aadebe3bdca93 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Wed, 24 Feb 2016 15:23:49 -0800 Subject: [PATCH] Make installers silent when run inside packages. --- ext/installfiles/linux/RPM/zerotier-one.spec.in | 4 ++-- ext/installfiles/linux/buildinstaller.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/installfiles/linux/RPM/zerotier-one.spec.in b/ext/installfiles/linux/RPM/zerotier-one.spec.in index a5445ba53..1ec3d42a3 100644 --- a/ext/installfiles/linux/RPM/zerotier-one.spec.in +++ b/ext/installfiles/linux/RPM/zerotier-one.spec.in @@ -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 diff --git a/ext/installfiles/linux/buildinstaller.sh b/ext/installfiles/linux/buildinstaller.sh index 1f6f89355..21f2f73ed 100755 --- a/ext/installfiles/linux/buildinstaller.sh +++ b/ext/installfiles/linux/buildinstaller.sh @@ -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