mcreboot.sh,mcstop+release.sh: rm -rf /tmp/mcreboot when it's done

This commit is contained in:
Masamichi Takagi
2018-03-27 23:25:44 +09:00
parent 82822b1f16
commit d5190990f5
2 changed files with 2 additions and 0 deletions

View File

@ -181,6 +181,7 @@ error_exit() {
if ! perl -e '$tmpdir="/tmp/mcreboot"; @files = grep { -f } glob "$tmpdir/proc/irq/*/smp_affinity"; foreach $file (@files) { $dest = substr($file, length($tmpdir)); if (0) {print "cp $file $dest\n";} system("cp $file $dest 2>/dev/null"); }'; then
echo "warning: failed to restore /proc/irq/*/smp_affinity" >&2
fi
if [ -e /tmp/mcreboot ]; then rm -rf /tmp/mcreboot; fi
fi
;&
irqbalance_stopped)

View File

@ -122,6 +122,7 @@ if [ "${irqbalance_used}" != "" ]; then
if ! perl -e '$tmpdir="/tmp/mcreboot"; @files = grep { -f } glob "$tmpdir/proc/irq/*/smp_affinity"; foreach $file (@files) { $dest = substr($file, length($tmpdir)); if (0) {print "cp $file $dest\n";} system("cp $file $dest 2>/dev/null"); }'; then
echo "warning: failed to restore /proc/irq/*/smp_affinity" >&2
fi
if [ -e /tmp/mcreboot ]; then rm -rf /tmp/mcreboot; fi
if ! systemctl start irqbalance.service; then
echo "warning: failed to start irqbalance" >&2;
fi