Displaying 20 results from an estimated 80 matches for "aug_set".
Did you mean:
aug_get
2010 May 11
1
[PATCH] GuestOS: Update XF86Config or xorg.conf as appropriate
..."/boot/grub/menu.lst");
}
+ # If we have XF86Config instead of xorg.conf, use that instead.
+ if (! $g->exists('/etc/X11/xorg.conf') &&
+ $g->exists('/etc/X11/XF86Config'))
+ {
+ $g->aug_set('/augeas/load/Xorg/incl[last()+1]',
+ '/etc/X11/XF86Config');
+ $self->{xorg} = '/etc/X11/XF86Config';
+ } else {
+ $self->{xorg} = '/etc/X11/xorg.conf';
+ }
+
# Make augeas pick up the new con...
2010 Apr 14
1
[PATCH] Workaround issue where grubby fails when run under libguestfs
...39;/files/boot/grub/menu.lst/title[last()+1]',
+ $title);
+
+ # N.B. Don't change the order of root, kernel and initrd below,
+ # or the guest will not boot.
+
+ # Copy root from the template
+ $g->aug_set('$new/root', $g->aug_get('$template/root'));
+
+ # Set kernel and initrd to the new values
+ $g->aug_set('$new/kernel', "$prefix/vmlinuz-$version");
+ $g->aug_set('$new/initrd', "$prefix/initrd-$ver...
2013 Sep 24
0
[PATCH 3/4] Add SUSE converter
...$incl ($g->aug_match("/augeas/load/Grub/incl")) {
+ if ($g->aug_get($incl) eq $self->{grub_conf}) {
+ $found = 1;
+ last;
+ }
+ }
+
+ # If it wasn't there, add it
+ unless ($found) {
+ $g->aug_set("/augeas/load/Grub/incl[last()+1]", $self->{grub_conf});
+
+ # Make augeas pick up the new configuration
+ $g->aug_load();
+ }
+ };
+ augeas_error($g, $@) if ($@);
+
+ return $self;
+}
+
+sub list_kernels
+{
+ my $self = shift;
+
+ my $g =...
2016 Nov 16
2
Re: [ovirt-users] OVA import of FC21 VM hangs during virt-v2v conversion?
...les/etc/sysconfig/kernel/DEFAULTKERNEL/value"
> guestfsd: main_loop: new request, len 0x5c
> guestfsd: main_loop: proc 24 (aug_match) took 0.00 seconds
> libguestfs: trace: v2v: aug_match =
> ["/files/etc/sysconfig/kernel/DEFAULTKERNEL/value"]
> libguestfs: 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_l...
2016 Jul 26
5
[PATCH v2 0/4] Improve LVM handling in the appliance
Hi,
this series improves the way LVM is used in the appliance: in
particular, now lvmetad can eventually run at all, and with the correct
configuration.
Also improve the listing strategies.
Changes in v2:
- dropped patch #5, will be sent separately
- move lvmetad statup in own function (patch #2)
Thanks,
Pino Toscano (4):
daemon: lvm-filter: set also global_filter
daemon: lvm-filter:
2016 Apr 12
3
[PATCH] v2v: add support for virtio-scsi
...the converted guest.
* Convert only the first scsi_hostadapter entry to virtio
@@ -1148,14 +1149,15 @@ let rec convert ~keep_serial_console (g : G.guestfs) inspect source rcaps =
List.iter (fun path -> ignore (g#aug_rm path))
(List.rev paths_to_delete);
- g#aug_set (path ^ "/modulename") "virtio_blk"
+ g#aug_set (path ^ "/modulename")
+ (string_of_block_type block_type)
) else (
(* We have to add a scsi_hostadapter. *)
let modpath = discover_modpath () in
g#aug_set (sprint...
2013 Oct 03
2
[PATCH] virt-v2v: Convert RedHat.pm to Linux.pm - for SUSE support
...$incl ($g->aug_match("/augeas/load/Grub/incl")) {
+ if ($g->aug_get($incl) eq $self->{grub_conf}) {
+ $found = 1;
+ last;
+ }
+ }
+
+ # If it wasn't there, add it
+ unless ($found) {
+ $g->aug_set("/augeas/load/Grub/incl[last()+1]", $self->{grub_conf});
+
+ # Make augeas pick up the new configuration
+ $g->aug_load();
+ }
+ };
+ augeas_error($g, $@) if ($@);
+
+ return $self;
+}
+
+sub list_kernels
+{
+ my $self = shift;
+
+ my $g =...
2016 Aug 15
2
[PATCH v2] v2v: factor out bootloader handling
...let rex = Str.regexp ".*/title\\[\\([1-9][0-9]*\\)\\]/kernel" in
+ if not (Str.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 in...
2015 Nov 20
0
[PATCH] v2v: factor out bootloader handling
...let rex = Str.regexp ".*/title\\[\\([1-9][0-9]*\\)\\]/kernel" in
+ if not (Str.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 in...
2016 Aug 15
0
Re: [PATCH v2] v2v: factor out bootloader handling
...t;.*/title\\[\\([1-9][0-9]*\\)\\]/kernel" in
> + if not (Str.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_con...
2009 Jul 31
1
[PATCH] Use grub entries to find Linux kernels
.../Modprobe/incl");
-
- # Calculate the next index of /augeas/load/Modprobe/incl
- my $i = 1;
- foreach ( @results ) {
- next unless m{/augeas/load/Modprobe/incl\[(\d*)]};
- $i = $1 + 1 if ($1 == $i);
- }
+ $g->aug_init("/", 16);
- $success = $g->aug_set("/augeas/load/Modprobe/incl[$i]",
- "/etc/modules.conf");
- $i++;
- $success = $g->aug_set("/augeas/load/Modprobe/incl[$i]",
- "/etc/conf.modules");
+ # Register additional paths to the Mo...
2016 Sep 01
2
[PATCH 0/2] customize: Fix hostname setting in Debian/Ubuntu.
https://bugzilla.redhat.com/show_bug.cgi?id=1372269
It was fairly broken. This fixes it -- except on Ubuntu 10.04 --
and adds a slow test.
Rich.
2016 Aug 25
2
[PATCH v2] v2v: factor out bootloader handling
...* then add it.
- *)
- 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 (
- g#aug_set "/augeas/load/Grub/incl[last()+1]" grub_config;
- Linux.augeas_reload g;
- )
-
- | `Grub2 -> () (* Not necessary for grub2. *)
+ if bootloader#set_augeas_configuration () then
+ Linux.augeas_reload g
and unconfigure_xen () =
(* Remove kmod-xenpv-* (RHEL...
2016 Jul 26
8
[PATCH 0/5] Improve LVM handling in the appliance
Hi,
this series improves the way LVM is used in the appliance: in
particular, now lvmetad can eventually run at all, and with the correct
configuration.
Also improve the listing strategies.
Thanks,
Pino Toscano (5):
daemon: lvm-filter: set also global_filter
daemon: lvm-filter: start lvmetad better
daemon: lvm: improve filter for LVs with activationskip flag set
daemon: lvm: list
2013 Sep 24
5
[PATCH 0/4] Add SUSE guest converter to virt-v2v
This is a new conversion module to convert SUSE Linux and openSUSE guests.
The converter is based on the RedHat module, and should offer the same
functionality on both SUSE and RedHat hosts.
There are a few additional messages in this module, such as reporting of
packages when installing through zypper or the local virt-v2v repo. These
messages don't necessarily flow unless verbose switches
2010 Apr 29
1
[PATCH] GuestOS: Fix augeas grub configuration
.../Grub/incl")) {
- $g->aug_rm($incl);
+ if ($g->aug_get($incl) eq '/boot/grub/menu.lst') {
+ $found = 1;
+ last;
+ }
+ }
+
+ # If it wasn't there, add it
+ unless ($found) {
+ $g->aug_set("/augeas/load/Grub/incl[last()+1]",
+ "/boot/grub/menu.lst");
+
+ # Make augeas pick up the new configuration
+ $g->aug_load();
}
- $g->aug_set("/augeas/load/Grub/incl[last()+1]", "/boot/grub/menu....
2010 May 11
1
[PATCH] GuestOS: Delete blkid.tab if it's present
...s changed, 5 insertions(+), 0 deletions(-)
diff --git a/lib/Sys/VirtV2V/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));
+ }...
2009 Aug 03
1
[REPOST] Use grub entries to find Linux kernels
This is a repost of the patch I sent on Friday. I know it was already ACK'd, but
I've changed a fair bit in addition to adding the requested POD. Specifically:
I discovered that augeas's grub lens wasn't returning cmdline the way I
expected. This is fixed.
The kernel package, if known, is output as a property of the kernel.
The XML output of virt-inspector is updated with all
2016 Apr 14
0
[PATCH v2] v2v: add support for virtio-scsi
...the converted guest.
* Convert only the first scsi_hostadapter entry to virtio
@@ -1150,14 +1157,14 @@ let rec convert ~keep_serial_console (g : G.guestfs) inspect source rcaps =
List.iter (fun path -> ignore (g#aug_rm path))
(List.rev paths_to_delete);
- g#aug_set (path ^ "/modulename") "virtio_blk"
+ g#aug_set (path ^ "/modulename") block_module
) else (
(* We have to add a scsi_hostadapter. *)
let modpath = discover_modpath () in
g#aug_set (sprintf "/files%s/alias[last()+1]" m...
2016 Apr 14
1
[PATCH v4] v2v: add support for virtio-scsi
...the converted guest.
* Convert only the first scsi_hostadapter entry to virtio
@@ -1148,14 +1155,14 @@ let rec convert ~keep_serial_console (g : G.guestfs) inspect source rcaps =
List.iter (fun path -> ignore (g#aug_rm path))
(List.rev paths_to_delete);
- g#aug_set (path ^ "/modulename") "virtio_blk"
+ g#aug_set (path ^ "/modulename") block_module
) else (
(* We have to add a scsi_hostadapter. *)
let modpath = discover_modpath () in
g#aug_set (sprintf "/files%s/alias[last()+1]" m...