diff options
author | P. J. McDermott <pj@pehjota.net> | 2014-10-07 20:28:03 (EDT) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2014-10-07 20:28:03 (EDT) |
commit | 6ca3ac8f4d34f2f0348d64178dc0b3e8ccd7aa7f (patch) | |
tree | f10d1191c1a05056bef57b2569bd096fdd973d7d | |
parent | 780ae30cce1427ad5909bc1896de3357d498c624 (diff) |
cmd/opkg: Clean up packages before session_end()feature/sessions
-rw-r--r-- | lib/cmd/opkg.sh | 6 |
1 files changed, 5 insertions, 1 deletions
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 } |