From f917af08133389103ba492323f53aa02056ad84f Mon Sep 17 00:00:00 2001 From: Valentin Vidic Date: Tue, 31 Jan 2012 15:23:22 +0100 Subject: [PATCH] Disable monit but allow insserv upgrade. --- src/actions/main.queue | 2 +- src/functions.sh | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/actions/main.queue b/src/actions/main.queue index 285ba62..b1bb65c 100644 --- a/src/actions/main.queue +++ b/src/actions/main.queue @@ -43,7 +43,7 @@ true install_new # instaliraj nove true remove_orphaned # ocisti stare libove nakon sto su cn paketi nadogradjeni # i ostatak true add_group_proc # za oidentd -true pkgadd monit-cn +true enable_monit pkg kernel-2.6-cn dpkg-reconfigure kernel-2.6-cn true dpkg-reconfigure sysv-rc # ovo bi trebalo biti predzadnje na popisu diff --git a/src/functions.sh b/src/functions.sh index 59cd2af..acc4dad 100644 --- a/src/functions.sh +++ b/src/functions.sh @@ -823,9 +823,19 @@ disable_monit () { apt-get remove --yes monit # stop the binary pkill -9 monit || true + # move away init for insserv to work + mv /etc/init.d/monit /var/lib/carnet-upgrade/ fi } +# allow monit to run again +enable_monit () { + if [ -f /var/lib/carnet-upgrade/monit ]; then + mv /var/lib/carnet-upgrade/monit /etc/init.d/monit + pkgadd monit-cn + fi +} + # check which of the given packages are installed grep_installed () { local package installed -- 1.7.10.4