>From de9e464423be060b9841a5f1c06c373c0a0a7bdc Mon Sep 17 00:00:00 2001 From: Matthew Booth Date: Fri, 19 Feb 2010 16:33:25 +0000 Subject: [PATCH] GuestOS: Always call aug_save() after aug_set() We call aug_load() in various places. This call explicitly throws away any unsaved changes in the tree. For safety, we should always call aug_save() after making changes to the tree. This change adds 2 missing calls. --- lib/Sys/VirtV2V/GuestOS/RedHat.pm | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/lib/Sys/VirtV2V/GuestOS/RedHat.pm b/lib/Sys/VirtV2V/GuestOS/RedHat.pm index 6adf8b8..3f5d90a 100644 --- a/lib/Sys/VirtV2V/GuestOS/RedHat.pm +++ b/lib/Sys/VirtV2V/GuestOS/RedHat.pm @@ -265,7 +265,8 @@ sub enable_kernel_module eval { $g->aug_set("/files/".$self->{modules}."/alias[last()+1]", $device); $g->aug_set("/files/".$self->{modules}."/alias[last()]/modulename", - $module) + $module); + $g->aug_save(); }; # Propagate augeas errors @@ -1113,6 +1114,7 @@ sub prepare_bootable last; } } + $g->aug_save(); }; # Propagate augeas failure -- 1.6.6