apt-zephyr: Send a “Done.” zephyr when dpkg finishes running.
authorAnders Kaseorg <andersk@mit.edu>
Sun, 21 Mar 2010 01:14:26 +0000 (21:14 -0400)
committerAnders Kaseorg <andersk@mit.edu>
Sun, 21 Mar 2010 01:14:54 +0000 (21:14 -0400)
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
apt-zephyr/90zephyr
apt-zephyr/apt-zephyr

index f2aa9cb4d19f274f22a28a991edd660c809babdd..563e792d619facd17072b77393782d5d83f6806a 100644 (file)
@@ -1,2 +1,3 @@
-DPkg::Pre-Install-Pkgs {"/usr/local/sbin/apt-zephyr || :";};
+DPkg::Pre-Install-Pkgs {"/usr/local/sbin/apt-zephyr --pre-install-pkgs || :";};
+DPkg::Post-Invoke {"/usr/local/sbin/apt-zephyr --post-invoke || :";};
 DPkg::Tools::options::/usr/local/sbin/apt-zephyr::Version "2";
index 7db23c592381a3885c9c1258d8412ef1a1b8c0a4..fdf13182a2abd4883c6c1d1d43960363053c565a 100755 (executable)
@@ -102,4 +102,18 @@ pre_install_pkgs ()
     esac
 }
 
-pre_install_pkgs
+post_invoke ()
+{
+    echo 'Done.' | send_zephyr
+}
+
+if [ "$1" = "--pre-install-pkgs" ]; then
+    pre_install_pkgs
+elif [ "$1" = "--post-invoke" ]; then
+    post_invoke
+else
+    echo "usage: $0 {--pre-install-pkgs | --post-invoke}" >&2
+    echo "(Hint: you probably need to update /etc/apt/apt.conf.d/90zephyr.)" >&2
+fi
+
+exit 0