From 6b4ddc0b854c10dcd2da7c74b29ac44d585b4b54 Mon Sep 17 00:00:00 2001 From: Greg Price Date: Wed, 10 Jun 2009 13:38:56 -0400 Subject: [PATCH] undo: check for sysfs later, after rmmod'ing old_code Two things can cause the kobject to disappear: removing a code module while in stage 'preparing', and entering stage cleanup. Signed-off-by: Greg Price --- ksplice-undo.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ksplice-undo.in b/ksplice-undo.in index e671637..ae78166 100644 --- a/ksplice-undo.in +++ b/ksplice-undo.in @@ -46,7 +46,6 @@ if (!update_loaded($kid) rmtree("/var/run/ksplice/updates/$kid") if (-e "/var/run/ksplice/updates/$kid"); exit(1); } -my $have_sysfs = update_loaded($kid); set_debug_level($kid, $debugon); my $failed = 0; @@ -58,6 +57,7 @@ foreach my $module (glob("${update}_*_old")) { } } +my $have_sysfs = update_loaded($kid); my $stage = ($have_sysfs && get_stage($kid)); if ($stage ne 'applied') { print "Ksplice id $kid is not applied; just cleaning up\n"; -- 2.11.4.GIT