Displaying 20 results from an estimated 81 matches for "aug_rm".
2014 Oct 28
1
[PATCH] sysprep: remove /var/spool/mail/username
...p/sysprep_operation_user_account.ml b/sysprep/sysprep_operation_user_account.ml
index fda5547..bda6331 100644
--- a/sysprep/sysprep_operation_user_account.ml
+++ b/sysprep/sysprep_operation_user_account.ml
@@ -83,6 +83,7 @@ let user_account_perform ~verbose ~quiet g root side_effects =
g#aug_rm userpath;
g#aug_rm (sprintf "/files/etc/shadow/%s" username);
g#aug_rm (sprintf "/files/etc/group/%s" username);
+ g#rm_rf ("/var/spool/mail/" ^ username);
match home_dir with
| None -> ()
| Some dir -&...
2014 Sep 02
2
[PATCH] sysprep: user-account: remove the correct home
...+1) (String.length userpath -i-1) in
if uid >= uid_min && uid <= uid_max
&& check_remove_user username then (
+ (* Get the home before removing the passwd entry. *)
+ let home_dir = g#aug_get (userpath ^ "/home") in
g#aug_rm userpath;
(* XXX Augeas doesn't yet have a lens for /etc/shadow, so the
* next line currently does nothing, but should start to
@@ -91,7 +93,7 @@ let user_account_perform ~verbose ~quiet g root side_effects =
*)
g#aug_rm (sprintf "/files/etc/sh...
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:
2018 Feb 27
1
Re: [PATCH] v2v: remove MAC address related information
...+ 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;
>
> It doesn't really matter but I think you could write this as:
>
> List.iter (g#aug_rm |> ignore) paths;
Ah, right. The magical |> operator... I keep forgetting about it.
>
> but your version may be clearer.
Agreed. I'll leave it as is then...
2018 Feb 27
5
[PATCH] v2v: remove MAC address related information
...WADDR=... entries from ifcfg-* files. *)
+ 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...
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
2018 Feb 27
0
Re: [PATCH] v2v: remove MAC address related information
...cfg-* files. *)
> + 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;
It doesn't really matter but I think you could write this as:
List.iter (g#aug_rm |> ignore) paths;
but your version may be clearer.
> + g#aug_save ()
> + );
> + (* Remove persistent udev rules. *)
> + try g#rm "/etc/udev/rules.d/70-pers...
2017 Jul 26
5
[PATCH 0/2] daemon: Reimplement handling of lvm.conf and filters.
Simplify how we handle lvm.conf.
2013 Sep 24
0
[PATCH 3/4] Add SUSE converter
...h);
+ $deleted++;
+ } else {
+ $console =~ s/\b(x|h)vc0\b/ttyS0/g;
+ $g->aug_set($augpath, $console);
+ }
+ }
+
+ if ($remove && $console =~ /\bttyS0\b/) {
+ $g->aug_rm($augpath);
+ }
+ }
+
+ for (my $i = 0; $i < $deleted; $i++) {
+ $g->aug_rm('$delconsole'.$i);
+ }
+ };
+ augeas_error($g, $@) if ($@);
+}
+
+sub check
+{
+ my $self = shift;
+ my ($path) = @_;
+
+ my $g = $self->{g};
+ my...
2013 Sep 25
0
Re: [PATCH 3/4] Add SUSE converter
...calls.
I'll fix that (in all places).
> > + # Delete the fstab entry for the EFI boot partition
> > + eval {
> > + foreach my $node ($g->aug_match("/files/etc/fstab/*[file =
> > '/boot/efi']")) + {
> > + $g->aug_rm($node);
> > + }
> > + };
> > + augeas_error($g, $@) if $@;
>
> This is a diff from RedHat.pm, and it looks wrong. It removes the call
> to aug_save(). In fact, I have a sneaking suspicion I may have fixed
> this in RedHat.pm since you forked RedHat.pm.
F...
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
2014 Sep 04
10
[PATCH 0/5] use augeas for /etc/shadow
Hi,
currently /etc/shadow is edited manually when needed (i.e. when setting
the password for an user), and it is not changed when removing users.
Import the upstream shadow.aug (currently in their development serie,
but not part of any released version yet), and use it only when the
augeas version is less than a potential 1.2.1 (covering also the case
when the new version is just 1.3.0).
Pino
2013 Oct 03
2
[PATCH] virt-v2v: Convert RedHat.pm to Linux.pm - for SUSE support
...h);
+ $deleted++;
+ } else {
+ $console =~ s/\b(x|h)vc0\b/ttyS0/g;
+ $g->aug_set($augpath, $console);
+ }
+ }
+
+ if ($remove && $console =~ /\bttyS0\b/) {
+ $g->aug_rm($augpath);
+ }
+ }
+
+ for (my $i = 0; $i < $deleted; $i++) {
+ $g->aug_rm('$delconsole'.$i);
+ }
+ };
+ augeas_error($g, $@) if ($@);
+}
+
+sub check
+{
+ my $self = shift;
+ my ($path, $root) = @_;
+
+ my $g = $self->{g};...
2020 May 05
3
[PATCH libguestfs-common 1/2] mlcustomize: Refactor SELinux_relabel code.
...available? *)
- if g#feature_available [| "selinuxrelabel" |] then (
- (* Use Augeas to parse /etc/selinux/config. *)
- g#aug_init "/" (16+32) (* AUG_SAVE_NOOP | AUG_NO_LOAD *);
- (* See: https://bugzilla.redhat.com/show_bug.cgi?id=975412#c0 *)
- ignore (g#aug_rm "/augeas/load/*[\"/etc/selinux/config/\" !~ regexp('^') + glob(incl) + regexp('/.*')]");
- g#aug_load ();
- debug_augeas_errors g;
-
- (* Get the SELinux policy name, eg. "targeted", "minimum".
- * Use "targeted"...
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
2014 Oct 24
2
[PATCH] daemon: Remove custom Augeas lenses.
...quot;/lvm/lvm.conf",
- 0 /* = included */);
- if (r == -1) {
- AUGEAS_ERROR ("aug_transform");
- return -1;
- }
-
- if (aug_load (aug) == -1) {
- AUGEAS_ERROR ("aug_load");
- return -1;
- }
-
/* Remove all the old filters ... */
r = aug_rm (aug, "/files/lvm/lvm.conf/devices/dict/filter/list/*");
if (r == -1) {
--
2.0.4
2016 Jul 01
4
[PATCH 0/2] v2v: fix setting custom modprobe options
Hi,
due to a broken discover_modpath function, and to a wrong block for a
match statement, the modprobe options for virtio/SCSI blocks where not
written at all.
This series provides a small refactor, and the fixes.
Thanks,
--
Pino Toscano (2):
v2v: fix and implify the internal Convert_linux:discover_modpath
v2v: fix priority of match in configure_kernel_modules
v2v/convert_linux.ml | 34
2020 Mar 09
4
[PATCH v3 0/3] Switch augeas APIs to OCaml
This reimplements the augeas APIs using ocaml-augeas (dropping all the
C code).
The behaviour seems unchanged, although I may have not tested all the
various corner cases.
Changes from v2:
- dropped patch #1, as it was applied already (was a real bugfix)
- rebased on master
Pino Toscano (3):
Revert "Revert "daemon: implement OptString for OCaml APIs""
daemon: move augeas
2020 Jan 09
5
[PATCH v2 0/4] Switch augeas APIs to OCaml
This reimplements the augeas APIs using ocaml-augeas (dropping all the
C code).
The behaviour seems unchanged, although I may have not tested all the
various corner cases.
Pino Toscano (4):
daemon: fix/enhance error reporting of Augeas exceptions
Revert "Revert "daemon: implement OptString for OCaml APIs""
daemon: move augeas APIs to OCaml
daemon: drop usage of C
2016 Jul 01
0
[PATCH 2/2] v2v: fix priority of match in configure_kernel_modules
...io_blk | Virtio_SCSI ->
let block_module =
match block_type with
@@ -1180,7 +1180,7 @@ let rec convert ~keep_serial_console (g : G.guestfs) inspect source rcaps =
| IDE ->
(* There is no scsi controller in an IDE guest. *)
List.iter (fun path -> ignore (g#aug_rm path)) (List.rev paths)
- ;
+ );
(* Display a warning about any leftover Xen modules which we
* haven't converted. These are likely to cause an error when
--
2.5.5