Displaying 20 results from an estimated 25 matches for "created_file".
Did you mean:
create_file
2014 Jan 21
1
[PATCH 1/2] sysprep: Update comments.
...+++ b/sysprep/sysprep_operation.mli
@@ -16,14 +16,16 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*)
-(** Structure used to describe sysprep operations. *)
+(** Defines the interface between the main program and sysprep operations. *)
val prog : string
type flag = [ `Created_files ]
type callback = Guestfs.guestfs -> string -> flag list
+(** [callback g root] is called to do work. *)
+(** Structure used to describe sysprep operations. *)
type operation = {
name : string;
(** Operation name, also used to enable the operation on the command
--
1.8.4.2
2012 Sep 19
2
[PATCH] sysprep: handle SuSE in hostname operation
...>
diff --git a/sysprep/sysprep_operation_hostname.ml b/sysprep/sysprep_operation_hostname.ml
index 3fc8800..363069b 100644
--- a/sysprep/sysprep_operation_hostname.ml
+++ b/sysprep/sysprep_operation_hostname.ml
@@ -45,6 +45,10 @@ let hostname_perform g root =
g#write filename file;
[ `Created_files ]
+ | "linux", ("opensuse"|"sles") ->
+ g#write "/etc/HOSTNAME" !hostname;
+ [ `Created_files ]
+
| "linux", ("debian"|"ubuntu") ->
g#write "/etc/hostname" !hostname;
[ `Created_files ]
--...
2012 Apr 06
2
[PATCH] virt-sysprep:add logging feature
..._get_distro root in
match typ, distro with
@@ -42,10 +42,12 @@ let hostname_perform g root =
String.concat "\n" lines ^
sprintf "\nHOSTNAME=%s\n" !hostname in
g#write filename file;
+ logging show_log "Modified HOSTNAME to %s" !hostname
[ `Created_files ]
| "linux", ("debian"|"ubuntu") ->
g#write "/etc/hostname" !hostname;
+ logging show_log "Modified HOSTNAME to %s" !hostname
[ `Created_files ]
| _ -> []
diff --git a/sysprep/sysprep_operation_logfiles.ml b/sysprep/sys...
2012 Aug 08
1
[PATCH] sysprep: remove the process accounting log files
...ificlinux"|"redhat-based") ->
+ let files = g#glob_expand "/var/account/pacct*" in
+ Array.iter (
+ fun file ->
+ try g#rm file with G.Error _ -> ()
+ ) files;
+ (try g#touch "/var/account/pacct" with G.Error _ -> ());
+ [ `Created_files ]
+
+ | "linux", ("debian"|"ubuntu") ->
+ let files = g#glob_expand "/var/log/account/pacct*" in
+ Array.iter (
+ fun file ->
+ try g#rm file with G.Error _ -> ()
+ ) files;
+ (try g#touch "/var/log/account/pacct"...
2012 Aug 16
5
[PATCH 0/4] Add customization capabilities to virt-sysprep
In the TODO file there's a discussion of perhaps writing a new
'virt-customize' tool. I think it's probably better (or at any rate,
easier) to just add this functionality into virt-sysprep. That is
what this small series of patches aims to achieve.
Note these are not very well tested at the moment.
The first patch adds a generic and useful '--firstboot' flag. The
2012 Apr 03
1
[PATCH RFC] sysprep:add logging feature
...name.ml
+++ b/sysprep/sysprep_operation_hostname.ml
@@ -42,10 +42,12 @@ let hostname_perform g root =
String.concat "\n" lines ^
sprintf "\nHOSTNAME=%s\n" !hostname in
g#write filename file;
+ eprintf "Modified HOSTNAME to %s\n" !hostname;
[ `Created_files ]
| "linux", ("debian"|"ubuntu") ->
g#write "/etc/hostname" !hostname;
+ eprintf "Modified HOSTNAME to %s\n" !hostname;
[ `Created_files ]
| _ -> []
--
1.7.10.rc3
2014 Dec 05
3
[PATCH] customize, sysprep: add a short SELinux note
Add a short paragraph about SELinux, mostly to point to the
documentation about it provided in the documentation of virt-builder.
---
customize/virt-customize.pod | 8 ++++++++
sysprep/virt-sysprep.pod | 8 ++++++++
2 files changed, 16 insertions(+)
diff --git a/customize/virt-customize.pod b/customize/virt-customize.pod
index a666be7..8dbdfef 100644
--- a/customize/virt-customize.pod
+++
2012 Apr 23
2
[PATCH] sysprep: flag the system for reconfiguration
...ion, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *)
+
+open Sysprep_operation
+
+module G = Guestfs
+
+let flag_reconfiguration g root =
+ let typ = g#inspect_get_type root in
+ if typ <> "windows" then (
+ g#touch "/.unconfigured";
+ [ `Created_files ]
+ )
+ else []
+
+let flag_reconfiguration_op = {
+ name = "flag-reconfiguration";
+ enabled_by_default = true;
+ heading = "Flag the system for reconfiguration";
+ pod_description = Some "\
+Flag the system for reconfiguration by touching a file
+\"/.unconfigu...
2012 Sep 03
2
[PATCH] sysprep: remove hostname from ifcfg-*
...e) in
+ let lines = List.filter (
+ fun line -> not (string_prefix line "HOSTNAME=")
+ ) lines in
+ let file = String.concat "\n" lines ^ "\n" in
+ g#write filename file
+ ) filenames;
+
+ if filenames <> [||] then [ `Created_files ] else []
+
+ | _ -> []
+
+let net_hostname_op = {
+ name = "net-hostname";
+ enabled_by_default = true;
+ heading = s_"Remove HOSTNAME in network interface configuration";
+ pod_description = Some (s_"\
+For Fedora and Red Hat Enterprise Linux,
+this is removed fr...
2018 Feb 12
2
[PATCH] inspect: recognize the Kali Linux distribution (RHBZ#1544227)
Read the information from os-release, and make it behave like a
Debian distribution (i.e. using dpkg, and apt).
---
daemon/inspect_fs.ml | 2 ++
daemon/inspect_fs_unix.ml | 1 +
daemon/inspect_types.ml | 2 ++
daemon/inspect_types.mli | 1 +
generator/actions_inspection.ml | 4 ++++
5 files changed, 10 insertions(+)
diff --git a/daemon/inspect_fs.ml
2013 Sep 06
0
[PATCH 4/5] sysprep: remove the custom tcp wrappers
...s = [ "/etc/hosts.atm";
+ "/etc/hosts.allow";
+ "/etc/hosts.deny"; ] in
+ List.iter (
+ fun path ->
+ (try g#rm path with G.Error _ -> ());
+ (try g#touch path with G.Error _ -> ());
+ ) paths;
+ [ `Created_files ]
+ )
+ else []
+
+let op = {
+ defaults with
+ name = "tcp-wrapper";
+ enabled_by_default = false;
+ heading = s_"Remove the custom tcp wrappers";
+ pod_description = Some (s_"\
+This removes the custom tcp wrappers by emptying C</etc/hosts.*>.
+
+Not...
2013 Sep 06
0
[PATCH 3/5] sysprep: remove the custom kdump configurations
...text
+
+module G = Guestfs
+
+let kdump_config_perform g root =
+ let typ = g#inspect_get_type root in
+ if typ <> "windows" then (
+ let path = "/etc/kdump.conf" in
+ (try g#rm path with G.Error _ -> ());
+ (try g#touch path with G.Error _ -> ());
+ [ `Created_files ]
+ )
+ else []
+
+let op = {
+ defaults with
+ name = "kdump-config";
+ enabled_by_default = false;
+ heading = s_"Remove the kdump configurations";
+ pod_description = Some (s_"\
+This removes the kdump configurations by emptying C</etc/kdump.conf>.&...
2013 Nov 07
1
Re: Add ability to set a command for firstboot and not only a script (#7)
Attaching the patch to this email.
Note we don't do github pull requests:
http://libguestfs.org/guestfs-faq.1.html#where-do-i-send-patches
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
2013 Sep 06
7
[PATCH 1/5] sysprep: remove tmp files
This removes tmp files under /tmp and /var/tmp.
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
---
sysprep/Makefile.am | 1 +
sysprep/sysprep_operation_tmp_files.ml | 52 ++++++++++++++++++++++++++++++++++
2 files changed, 53 insertions(+)
create mode 100644 sysprep/sysprep_operation_tmp_files.ml
diff --git a/sysprep/Makefile.am b/sysprep/Makefile.am
index
2012 Mar 31
3
[PATCH (incomplete)] Rewrite virt-sysprep in OCaml.
This patch is incomplete but it illustrates the idea. virt-sysprep is
rewritten as a modular tool in OCaml.
Only the 'utmp' and 'hostname' operations are implemented at the
moment.
Rich.
2015 Jul 29
2
[PATCH 1/2] sysprep: machine_id: simplify implementation
...=
+let machine_id_perform (g : Guestfs.guestfs) root side_effects =
let typ = g#inspect_get_type root in
if typ <> "windows" then (
- let path = "/etc/machine-id" in
- (try g#rm path with G.Error _ -> ());
- (try
- g#touch path;
- side_effects#created_file ()
- with G.Error _ -> ());
+ let paths = [ "/etc/machine-id"; ] in
+ let paths = List.filter g#is_file paths in
+ List.iter g#truncate paths
)
let op = {
--
2.1.0
2010 Mar 31
3
[PATCH] Remove v2v-snapshot
...or roll it back back before creating ".
- "a new snapshot.", guest => $name));
- return -1;
- }
-
- # Keep a list files and volumes created by the snapshot process. We need to
- # clean all of these up in the event of an error.
- my @created_files = ();
- my @created_volumes = ();
-
- my $ret = eval {
- # Write the backup
- my $xmlbackup;
- open($xmlbackup, '>', $xmlpath)
- or die(__x("Unable to write to {path}: {error}",
- path => $xmlpath, error => $!))...
2018 Feb 12
0
[PATCH] customize, sysprep, v2v: handle Kali Linux as Debian
.../sysprep_operation_pacct_log.ml b/sysprep/sysprep_operation_pacct_log.ml
index 047cb39f3..7c734a493 100644
--- a/sysprep/sysprep_operation_pacct_log.ml
+++ b/sysprep/sysprep_operation_pacct_log.ml
@@ -36,7 +36,7 @@ let pacct_log_perform (g : Guestfs.guestfs) root side_effects =
side_effects#created_file ()
with G.Error _ -> ())
- | "linux", ("debian"|"ubuntu") ->
+ | "linux", ("debian"|"ubuntu"|"kalilinux") ->
let files = g#glob_expand "/var/log/account/pacct*" in
Array.iter (
fun fi...
2020 May 04
7
[PATCH 0/4] sysprep: add FreeIPA offline unenrollment (RHBZ#1789592)
This patch series adds a new virt-sysprep operation to offline unenroll
a guest from FreeIPA. It does so by removing some configuration files
and certificates.
It requires a change in libguestfs-common before the series is applied.
Pino Toscano (4):
customize: port do_run to run_in_guest_command
sysprep: add a update_system_ca_store side effect
sysprep: ca-certificates: request system CA
2014 Jan 10
3
[PATCH 0/3] Timezone and keyboard layout settings in virt-builder and virt-sysprep.
Setting timezone is easy.
It turns out to be almost impossible to set keyboard layout in
virt-builder sanely, so I have added some examples instead.
Coming up next, setting languages in virt-builder (clue: very very
very hard).
Rich.