mirror of
https://github.com/Kicksecure/security-misc.git
synced 2024-12-22 20:23:35 +07:00
use TMP, sponge, refactoring
This commit is contained in:
parent
62a551cfe3
commit
d32cb8c95b
@ -4,10 +4,10 @@
|
||||
## See the file COPYING for copying conditions.
|
||||
|
||||
write_pid_file() {
|
||||
safe-rm -rf /tmp/security-misc-apt-get-update-pid;
|
||||
install -m644 /dev/null /tmp/security-misc-apt-get-update-pid \
|
||||
|| exit 1
|
||||
echo "$$" > /tmp/security-misc-apt-get-update-pid
|
||||
[[ -z "${TMP:-}" ]] && error "TMP is unset"
|
||||
safe-rm -rf "$TMP/security-misc-apt-get-update-pid";
|
||||
install -m644 /dev/null "$TMP/security-misc-apt-get-update-pid" || exit 1
|
||||
echo "$$" | sponge -- "$TMP/security-misc-apt-get-update-pid"
|
||||
}
|
||||
|
||||
sigterm_trap() {
|
||||
|
Loading…
Reference in New Issue
Block a user