search for: aug_sav

Displaying 20 results from an estimated 87 matches for "aug_sav".

Did you mean: aug_save
2016 Aug 15
2
[PATCH v2] v2v: factor out bootloader handling
...tr.string_match rex path 0) then + error (f_"internal error: regular expression did not match '%s'") + path; + let index = int_of_string (Str.matched_group 1 path) - 1 in + g#aug_set (sprintf "/files%s/default" grub_config) (string_of_int index); + g#aug_save () + + method set_augeas_configuration () = + let incls = g#aug_match "/augeas/load/Grub/incl" in + let incls = Array.to_list incls in + let incls_contains_conf = + List.exists (fun incl -> g#aug_get incl = grub_config) incls in + if not incls_contains_conf then ( +...
2015 Nov 20
0
[PATCH] v2v: factor out bootloader handling
...tr.string_match rex path 0) then + error (f_"internal error: regular expression did not match '%s'") + path; + let index = int_of_string (Str.matched_group 1 path) - 1 in + g#aug_set (sprintf "/files%s/default" grub_config) (string_of_int index); + g#aug_save () + + method set_augeas_configuration () = + let incls = g#aug_match "/augeas/load/Grub/incl" in + let incls = Array.to_list incls in + let incls_contains_conf = + List.exists (fun incl -> g#aug_get incl = grub_config) incls in + if not incls_contains_conf then ( +...
2016 Aug 15
0
Re: [PATCH v2] v2v: factor out bootloader handling
...0) then > + error (f_"internal error: regular expression did not match '%s'") > + path; > + let index = int_of_string (Str.matched_group 1 path) - 1 in > + g#aug_set (sprintf "/files%s/default" grub_config) (string_of_int index); > + g#aug_save () > + > + method set_augeas_configuration () = > + let incls = g#aug_match "/augeas/load/Grub/incl" in > + let incls = Array.to_list incls in > + let incls_contains_conf = > + List.exists (fun incl -> g#aug_get incl = grub_config) incls in > + i...
2016 Aug 25
2
[PATCH v2] v2v: factor out bootloader handling
...match rex path 0) then - error (f_"internal error: regular expression did not match '%s'") - path; - let index = int_of_string (Str.matched_group 1 path) - 1 in - g#aug_set (sprintf "/files%s/default" grub_config) (string_of_int index); - g#aug_save () - - | `Grub2 -> - let cmd = - if g#exists "/sbin/grubby" then - [| "grubby"; "--set-default"; kernel.ki_vmlinuz |] - else - [| "/usr/bin/perl"; "-MBootloader::Tools"; "-e"; sprintf " -...
2010 May 13
1
[PATCH] Improve augeas error reporting
...+ next unless($device =~ m{^/dev/([a-z]+)(\d*)}); + my $name = $1; + my $part = $2; - next unless(exists($map{$name})); + next unless(exists($map{$name})); - $g->aug_set($spec, "/dev/".$map{$name}.$part); - } - $g->aug_save(); + $g->aug_set($spec, "/dev/".$map{$name}.$part); + } + $g->aug_save(); + }; + + $self->_augeas_error($@) if ($@); # Delete cached (and now out of date) blkid info if it exists foreach my $blkidtab ('/etc/blkid/blkid.tab', ...
2016 Nov 16
2
Re: [ovirt-users] OVA import of FC21 VM hangs during virt-v2v conversion?
...ibguestfs: trace: v2v: aug_set > "/files/etc/sysconfig/kernel/DEFAULTKERNEL/value" "kernel-core" > guestfsd: main_loop: new request, len 0x6c > guestfsd: main_loop: proc 20 (aug_set) took 0.00 seconds > libguestfs: trace: v2v: aug_set = 0 > libguestfs: trace: v2v: aug_save > guestfsd: main_loop: new request, len 0x28 > guestfsd: main_loop: proc 25 (aug_save) took 0.00 seconds > libguestfs: trace: v2v: aug_save = 0 > libguestfs: trace: v2v: aug_match "/files/etc/inittab/*/process" > guestfsd: main_loop: new request, len 0x48 > guestfsd: ma...
2010 May 11
1
[PATCH] GuestOS: Delete blkid.tab if it's present
.../GuestOS/RedHat.pm b/lib/Sys/VirtV2V/GuestOS/RedHat.pm index 7c41ff6..ba37001 100644 --- a/lib/Sys/VirtV2V/GuestOS/RedHat.pm +++ b/lib/Sys/VirtV2V/GuestOS/RedHat.pm @@ -1132,6 +1132,11 @@ sub remap_block_devices $g->aug_set($spec, "/dev/".$map{$name}.$part); } $g->aug_save(); + + # Delete cached (and now out of date) blkid info if it exists + foreach my $blkidtab ('/etc/blkid/blkid.tab', '/etc/blkid.tab') { + $g->rm($blkidtab) if ($g->exists($blkidtab)); + } } sub _drivecmp -- 1.6.6.1
2016 Sep 13
1
[PATCH v3 2/2] v2v: ilnux: detect name of grub2-mkconfig
...onfig" + ] in + try List.find (g#is_file ~followsymlinks:true) elems + with Not_found -> + error (f_"failed to find grub2-mkconfig binary (but Grub2 was detected on guest)") + in + object (self) inherit bootloader @@ -218,7 +231,7 @@ object (self) g#aug_save (); try - ignore (g#command [| "grub2-mkconfig"; "-o"; grub_config |]) + ignore (g#command [| grub2_mkconfig_cmd; "-o"; grub_config |]) with G.Error msg -> warning (f_"could not rebuild grub2 config...
2014 Sep 02
2
[PATCH] sysprep: user-account: remove the correct home
...~quiet g root side_effects = *) g#aug_rm (sprintf "/files/etc/shadow/%s" username); g#aug_rm (sprintf "/files/etc/group/%s" username); - g#rm_rf ("/home/" ^ username) + g#rm_rf home_dir ) ) users; g#aug_save (); -- 1.9.3
2014 Feb 13
2
Re: [PATCH] mllib: hostname: replace the hostname on Debian also in /etc/hosts (RHBZ#953907).
On Thursday 13 February 2014 13:33:16 Richard W.M. Jones wrote: > On Thu, Feb 13, 2014 at 02:15:31PM +0100, Pino Toscano wrote: > > + let expr = "/files/etc/hosts/*[label() != '#comment']/*[label() > > != 'ipaddr'][. = '" ^ oldhost ^ "']" in > Quoting? If oldhost contains a ' character + some Augeas code, this > might be
2016 Sep 12
2
[PATCH 2/2] v2v: ilnux: detect name of grub2-mkconfig
...ith Not_found -> + error (f_"failed to find grub2-mkconfig binary (but Grub2 was detected on guest)") + method private grub2_update_console ~remove () = let rex = Str.regexp "\\(.*\\)\\bconsole=[xh]vc0\\b\\(.*\\)" in @@ -218,7 +234,7 @@ object (self) g#aug_save (); try - ignore (g#command [| "grub2-mkconfig"; "-o"; grub_config |]) + ignore (g#command [| grub2_mkconfig_cmd; "-o"; grub_config |]) with G.Error msg -> warning (f_"could not rebuild grub2 config...
2010 Feb 18
2
[PATCH 1/2] ESX: Look harder for potential transfer failures
Although I can't reproduce, I seem to have had an incomplete transfer which wasn't picked up by the existing error handling. This change adds some more sanity checks: * Check for error on close() (should have been doing this anyway) * Check that the bytes received == reported content length --- lib/Sys/VirtV2V/Transfer/ESX.pm | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1
2018 Feb 27
5
[PATCH] v2v: remove MAC address related information
...iles. *) + let paths = g#aug_match + "/files/etc/sysconfig/network-scripts/*[label() =~ glob('ifcfg-*')]/HWADDR" in + let paths = Array.to_list paths in + if paths <> [] then ( + List.iter (fun path -> ignore (g#aug_rm path)) paths; + g#aug_save () + ); + (* Remove persistent udev rules. *) + try g#rm "/etc/udev/rules.d/70-persistent-net.rules" + with G.Error _ -> () + + and configure_kernel () = (* Previously this function would try to install kernels, but we * don't do that any longer. -- 2....
2010 Apr 14
1
[PATCH] Workaround issue where grubby fails when run under libguestfs
...z-$version") { # Ensure it's the default $kernel =~ m{/files/boot/grub/menu.lst/title(?:\[(\d+)\])?/kernel} or die($kernel); @@ -1068,24 +1075,118 @@ sub prepare_bootable last; } } - $g->aug_save(); + + # grubby can sometimes fail to correctly update grub.conf when run from + # libguestfs. If it looks like this happened, install a new grub config + # here. + if (!$found) { + # Check that an appropriately named kernel and initrd exist + if (...
2014 Sep 29
2
[PATCH 1/2] builder, customize: disable SELinux
Having SELinux enabled (even if not enforcing) in the appliance causes troubles to applications/libraries that read/write SELinux attributes. --- builder/builder.ml | 6 +++++- customize/customize_main.ml | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/builder/builder.ml b/builder/builder.ml index a407924..5195cfd 100644 --- a/builder/builder.ml +++
2010 Feb 19
2
[PATCH 1/2] Fix remapping of block devices
...pec')) { + my $device = $g->aug_get($spec); + + next unless($device =~ m{^/dev/([a-z]+)(\d*)}); + my $name = $1; + my $part = $2; + + next unless(exists($map{$name})); + + $g->aug_set($spec, "/dev/".$map{$name}.$part); + } + $g->aug_save(); +} + +sub _drivecmp +{ + my ($prefix, $a, $b) = @_; + + map { + $_ =~ /^$prefix([a-z]+)/ or die("drive $_ doesn't have prefix $prefix"); + $_ = $1; + } ($a, $b); + + return -1 if (length($a) < length($b)); + return 1 if (length($a) > length($b));...
2010 Sep 13
3
[PATCH 1/4] Check that we're not overwriting an existing Libvirt domain
Exit with an error if we would overwrite an existing libvirt domain. Fixes RHBZ#617110 --- lib/Sys/VirtV2V/Connection/LibVirt.pm | 4 ++++ lib/Sys/VirtV2V/Target/LibVirt.pm | 31 ++++++++++++++++++++++++++++++- lib/Sys/VirtV2V/Target/RHEV.pm | 11 +++++++++++ 3 files changed, 45 insertions(+), 1 deletions(-) diff --git a/lib/Sys/VirtV2V/Connection/LibVirt.pm
2013 Oct 03
2
[PATCH] virt-v2v: Convert RedHat.pm to Linux.pm - for SUSE support
...gt; $path) + unless defined($aug_path); + + $aug_path =~ m{/files$grub_conf/title(?:\[(\d+)\])?/kernel} + or die($aug_path); + my $grub_index = defined($1) ? $1 - 1 : 0; + + $g->aug_set("/files$grub_conf/default", $grub_index); + $g->aug_save(); + }; + augeas_error($g, $@) if ($@); +} + +# For Grub legacy, all we have to do is re-install grub in the correct place. +sub convert_efi +{ + my $self = shift; + my ($device) = @_; + + my $g = $self->{g}; + + $g->cp('/etc/grub.conf', '/boot/grub/grub.conf...
2013 Sep 24
0
[PATCH 3/4] Add SUSE converter
...gt; $path) + unless defined($aug_path); + + $aug_path =~ m{/files$grub_conf/title(?:\[(\d+)\])?/kernel} + or die($aug_path); + my $grub_index = defined($1) ? $1 - 1 : 0; + + $g->aug_set("/files$grub_conf/default", $grub_index); + $g->aug_save(); + }; + augeas_error($g, $@) if ($@); +} + +# For Grub legacy, all we have to do is re-install grub in the correct place. +sub convert_efi +{ + my $self = shift; + my ($device) = @_; + + my $g = $self->{g}; + + $g->cp('/etc/grub.conf', '/boot/grub/grub.conf...
2010 Jul 28
3
Create new Sys::VirtV2V::Util
These 2 patches are mostly code motion. They were prompted by an apparent augeas error in BZ 613967 which didn't display useful error message. The error seems to happen in Converter::Linux. GuestOS::RedHat had a handy function which displayed verbose augeas error messages. This function moves into the new module where it can be used by both modules. The second patch is an consequential tidy