From 6ca3ac8f4d34f2f0348d64178dc0b3e8ccd7aa7f Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Tue, 07 Oct 2014 20:28:03 -0400 Subject: cmd/opkg: Clean up packages before session_end() --- (limited to 'lib') diff --git a/lib/cmd/opkg.sh b/lib/cmd/opkg.sh index 795322c..9f0c0de 100644 --- a/lib/cmd/opkg.sh +++ b/lib/cmd/opkg.sh @@ -79,10 +79,11 @@ cmd_opkg_main() profile_set "${ID}" session_begin "${root}" . cmd_opkg_fini false + session_exec opkg "${@}" - session_end cmd_opkg_fini + session_end } cmd_opkg_fini() @@ -90,6 +91,9 @@ cmd_opkg_fini() case "${cmd_opkg_opks}" in *[!\ ]*) rm -f ${cmd_opkg_opks} + # Hack to avoid this code branch if the function is + # called again in response to a signal. + cmd_opkg_opks='' ;; esac } -- cgit v0.9.1