From d5190990f558f87659fba32fcdca4546bd0024bd Mon Sep 17 00:00:00 2001 From: Masamichi Takagi Date: Tue, 27 Mar 2018 23:25:44 +0900 Subject: [PATCH] mcreboot.sh,mcstop+release.sh: rm -rf /tmp/mcreboot when it's done --- arch/x86_64/tools/mcreboot-smp-x86.sh.in | 1 + arch/x86_64/tools/mcstop+release-smp-x86.sh.in | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/x86_64/tools/mcreboot-smp-x86.sh.in b/arch/x86_64/tools/mcreboot-smp-x86.sh.in index e07b0140..084aab4a 100644 --- a/arch/x86_64/tools/mcreboot-smp-x86.sh.in +++ b/arch/x86_64/tools/mcreboot-smp-x86.sh.in @@ -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) diff --git a/arch/x86_64/tools/mcstop+release-smp-x86.sh.in b/arch/x86_64/tools/mcstop+release-smp-x86.sh.in index 66cf41aa..b6748b3b 100644 --- a/arch/x86_64/tools/mcstop+release-smp-x86.sh.in +++ b/arch/x86_64/tools/mcstop+release-smp-x86.sh.in @@ -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