search for: write_append

Displaying 20 results from an estimated 26 matches for "write_append".

2018 Oct 04
3
[PATCH 0/2] v2v: uninstall VMware tools on all Linux guests
Hi, this patch series attempt to uninstall VMware tools on all the Linux guests, and reduce the uninstallation time needed in some cases: - v2v tries to workaround the slowest part of the tarball-installed VMware tools - v2v uninstalls the open source VMware tools (open-vm-tools) Thanks, Pino Toscano (2): v2v: linux: remove open-vm-tools packages v2v: linux: try to trick
2016 Dec 16
0
IRC question: appending newline to end of file
16:43 < martingo_> hi all 16:43 < martingo_> I am using write_append to write at the end of one file 16:43 < martingo_> but newline he is not taking 16:43 < martingo_> guestfish add ./overcloud-full.qcow2 : run : mount /dev/sda / : write_append /etc/fstab "nodev /mnt/huge_qemu_1G hugetlbfs rw,pagesize=1G 0 0\n" 16:43 < m...
2018 Oct 04
0
[PATCH 2/2] v2v: linux: try to trick vmware-uninstall-tools.pl
...ools installation to not do any ramdisk + * restore. In any case, we will rebuilt the ramdisk of the + * default kernel already. + *) + let locations = "/etc/vmware-tools/locations" in + if g#is_file ~followsymlinks:true locations then ( + g#write_append locations "remove_answer RESTORE_RAMDISK_CMD\n"; + g#write_append locations "remove_answer RESTORE_RAMDISK_KERNELS\n"; + g#write_append locations "remove_answer RESTORE_RAMDISK_ONECALL\n"; + ); if family = `SUSE_family then...
2016 Sep 13
1
[PATCH v3 1/2] v2v: linux: correctly reconfigure the initrd on Debian
...mfs was not found in the guest") + initrd; + + (* The modules to add to initrd are defined in a file. *) + let modules = String.concat "\n" modules in + let modules = "#\n# Added by virt-v2v\n" ^ modules ^ "\n" in + ignore (g#write_append "/etc/initramfs-tools/modules" modules); + + run_update_initramfs_command () + ) else if g#is_file ~followsymlinks:true "/sbin/mkinitrd" then ( let module_args = List.map (sprintf "--with=%s") modules in let args = -- 2.9.3
2017 Mar 13
2
virt-customize fail to inject firstboot script when running it from script.
...quot;/var/lib/systemd/random-seed" libguestfs: trace: is_file = 1 libguestfs: trace: filesize "/var/lib/systemd/random-seed" libguestfs: trace: filesize = 512 libguestfs: trace: truncate "/var/lib/systemd/random-seed" libguestfs: trace: truncate = 0 libguestfs: trace: write_append "/var/lib/systemd/random-seed" "\x9e\x92\xa5\xae\xa3\x13\xb3Qt'\x1fn\x00\xd9\xf6\xcd\x1cYP\x14U\x1b\xfbc\xdd\xa2\x95\xd1\xdf\x0d\x94\xf7\xb8\xba$\x18z \xe2,\xd3\xd0u\xb9F\xd9\x87G\x8c\x16S\x90q\xf12(a\x89\xb1\xab\x8b\xd4\xd4M\xc4\xc6\xb0\x186\xe2A\x09\x99\xd1\xb8;\xee\x9b\xef\xee...
2016 Aug 09
2
Re: [PATCH 8/8] v2v: linux: correctly reconfigure the initrd on Debian
On Mon, 8 Aug 2016 18:38:55 +0200 Pino Toscano <ptoscano@redhat.com> wrote: > Use the canonical way to regenerate the initrd images for all the > installed kernels, i.e. reconfigure the initramfs-tools which will > trigger the kernel postinst scripts. > --- > v2v/convert_linux.ml | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git
2017 Mar 14
0
Re: virt-customize fail to inject firstboot script when running it from script.
...eed" > libguestfs: trace: is_file = 1 > libguestfs: trace: filesize "/var/lib/systemd/random-seed" > libguestfs: trace: filesize = 512 > libguestfs: trace: truncate "/var/lib/systemd/random-seed" > libguestfs: trace: truncate = 0 > libguestfs: trace: write_append "/var/lib/systemd/random-seed" "\x9e\x92\xa5\xae\xa3\x13\xb3Qt'\x1fn\x00\xd9\xf6\xcd\x1cYP\x14U\x1b\xfbc\xdd\xa2\x95\xd1\xdf\x0d\x94\xf7\xb8\xba$\x18z \xe2,\xd3\xd0u\xb9F\xd9\x87G\x8c\x16S\x90q\xf12(a\x89\xb1\xab\x8b\xd4\xd4M\xc4\xc6\xb0\x186\xe2A\x09\x99\xd1\xb8;\xee\x9b\xef\xee...
2016 Aug 10
0
[PATCH 1/2] v2v: linux: correctly reconfigure the initrd on Debian
...mfs was not found in the guest") + initrd; + + (* The modules to add to initrd are defined in a file. *) + let modules = String.concat "\n" modules in + let modules = "#\n# Added by virt-v2v\n" ^ modules ^ "\n" in + ignore (g#write_append "/etc/initramfs-tools/modules" modules); + + run_update_initramfs_command () + ) else if g#is_file ~followsymlinks:true "/sbin/mkinitrd" then ( let module_args = List.map (sprintf "--with=%s") modules in let args = -- 2.9.2
2016 Sep 12
0
[PATCH 1/2] v2v: linux: correctly reconfigure the initrd on Debian
...mfs was not found in the guest") + initrd; + + (* The modules to add to initrd are defined in a file. *) + let modules = String.concat "\n" modules in + let modules = "#\n# Added by virt-v2v\n" ^ modules ^ "\n" in + ignore (g#write_append "/etc/initramfs-tools/modules" modules); + + run_update_initramfs_command () + ) else if g#is_file ~followsymlinks:true "/sbin/mkinitrd" then ( let module_args = List.map (sprintf "--with=%s") modules in let args = -- 2.9.3
2016 Aug 10
0
Re: [PATCH 8/8] v2v: linux: correctly reconfigure the initrd on Debian
...virt-v2v >> /etc/initramfs-tools/modules'"); > let cmd = (sprintf "sh -c 'echo %s >> /etc/initramfs-tools/modules'" > (String.concat " " modules)) in > ignore (g#sh cmd); If we want to do that, then please use the write_append API for this. Thanks, -- Pino Toscano
2017 Mar 14
2
Re: virt-customize fail to inject firstboot script when running it from script.
...libguestfs: trace: is_file = 1 >> libguestfs: trace: filesize "/var/lib/systemd/random-seed" >> libguestfs: trace: filesize = 512 >> libguestfs: trace: truncate "/var/lib/systemd/random-seed" >> libguestfs: trace: truncate = 0 >> libguestfs: trace: write_append "/var/lib/systemd/random-seed" "\x9e\x92\xa5\xae\xa3\x13\xb3Qt'\x1fn\x00\xd9\xf6\xcd\x1cYP\x14U\x1b\xfbc\xdd\xa2\x95\xd1\xdf\x0d\x94\xf7\xb8\xba$\x18z \xe2,\xd3\xd0u\xb9F\xd9\x87G\x8c\x16S\x90q\xf12(a\x89\xb1\xab\x8b\xd4\xd4M\xc4\xc6\xb0\x186\xe2A\x09\x99\xd1\xb8;\xee\x9b\xef\xee...
2017 Feb 21
0
[PATCH 3/3] dib: rename "aux" to "in_target.aux"
...get.aux" // "hooks" in let hook_dir = hooks_dir // hook_name in do_mkdir mount_dir; @@ -479,7 +479,7 @@ let run_install_packages ~debug ~blockdev ~log_file let pkgs_string = String.concat " " packages in message (f_"Installing: %s") pkgs_string; g#write_append log_file (sprintf "Installing %s...\n" pkgs_string); - let out = g#sh (sprintf "/tmp/aux/run-and-log.sh '%s' '' '' '%s' '/tmp/aux' '' 'install-packages.sh'" log_file blockdev) in + let out = g#sh (sprintf "/tmp/in_ta...
2014 Nov 02
3
[PATCH] customize: Add --ssh-inject option for injecting SSH keys.
...+ + (* Create ~user/.ssh/authorized_keys if it doesn't exist. *) + let auth_keys = sprintf "%s/authorized_keys" ssh_dir in + if not (g#exists auth_keys) then ( + g#touch auth_keys; + g#chmod 0o644 auth_keys + ); + + (* Append the key. *) + g#write_append auth_keys key + | typ -> + warning (f_"don't know how to inject SSH keys into %s guests") typ + in + (* Set the random seed. *) msg (f_"Setting a random seed"); if not (Random_seed.set_random_seed g root) then @@ -232,6 +307,12 @@ exec >>%s 2>&a...
2017 Feb 21
3
[PATCH 1/3] dib: unset all temporary dirs envvars in fake-sudo
The real sudo does it as well, and leaving them when preserving the environment (-E) maybe breaks the applications, as e.g. chroot will have a TMPDIR path pointing outside of it. --- dib/dib.ml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dib/dib.ml b/dib/dib.ml index df83ba1..d15cd19 100644 --- a/dib/dib.ml +++ b/dib/dib.ml @@ -301,6 +301,11 @@ if [ -z \"$preserve_env\" ];
2016 Sep 30
2
[PATCH] customize: Add --append-line.
...ile ends in virtual newline *) + else if size >= Int64.of_int len then + g#pread path len (size -^ Int64.of_int len) + else + g#pread path len 0L in + let line = + if last_chars = newline then line + else newline ^ line in + + (* Finally, append. *) + g#write_append path line + ) diff --git a/customize/append_line.mli b/customize/append_line.mli new file mode 100644 index 0000000..11c2da5 --- /dev/null +++ b/customize/append_line.mli @@ -0,0 +1,20 @@ +(* virt-customize + * Copyright (C) 2016 Red Hat Inc. + * + * This program is free software; you can redistri...
2014 Nov 03
0
[PATCH] customize: Add --ssh-inject option for injecting SSH keys.
...g#chmod 0o755 ssh_dir + ); + + (* Create ~user/.ssh/authorized_keys if it doesn't exist. *) + let auth_keys = sprintf "%s/authorized_keys" ssh_dir in + if not (g#exists auth_keys) then ( + g#touch auth_keys; + g#chmod 0o644 auth_keys + ); + + (* Append the key. *) + g#write_append auth_keys key diff --git a/customize/ssh_key.mli b/customize/ssh_key.mli new file mode 100644 index 0000000..3223e55 --- /dev/null +++ b/customize/ssh_key.mli @@ -0,0 +1,31 @@ +(* virt-customize + * Copyright (C) 2014 Red Hat Inc. + * + * This program is free software; you can redistribute it and/o...
2015 May 29
0
[PATCH v3] RFC: New virt-dib tool
...Buffer.create 16384 in + let timings = Hashtbl.create 13 in + let new_wd = + match sysroot, new_wd with + | (Out|Subroot), "" -> "''" + | _, dir -> dir in + List.iter ( + fun x -> + message (f_"Running: %s/%s") hook_name x; + g#write_append log_file (sprintf "Running %s/%s...\n" hook_name x); + let out = ref "" in + let run () = + let outstr = + match sysroot with + | In -> + g#sh (sprintf "/tmp/aux/run-and-log.sh '%s' '' '' '%s...
2015 Jul 03
1
[PATCH v5] New tool: virt-dib
...Buffer.create 16384 in + let timings = Hashtbl.create 13 in + let new_wd = + match sysroot, new_wd with + | (Out|Subroot), "" -> "''" + | _, dir -> dir in + List.iter ( + fun x -> + message (f_"Running: %s/%s") hook_name x; + g#write_append log_file (sprintf "Running %s/%s...\n" hook_name x); + let out = ref "" in + let run () = + let outstr = + match sysroot with + | In -> + g#sh (sprintf "/tmp/aux/run-and-log.sh '%s' '' '' '%s'...
2015 Mar 31
0
[PATCH] WIP: New virt-dib tool
...) else ( + let timings = Hashtbl.create 13 in + let new_wd = + match sysroot, new_wd with + | (Out|Subroot), "" -> "''" + | _, dir -> dir in + List.iter ( + fun x -> + msg (f_"Running: %s/%s") hook_name x; + g#write_append log_file (sprintf "Running %s/%s...\n" hook_name x); + let out = ref "" in + let run () = + let outstr = + match sysroot with + | In -> + g#sh (sprintf "/tmp/aux/run-and-log.sh '%s' '' '...
2015 Jun 16
2
[PATCH v4] RFC: New tool: virt-dib
...Buffer.create 16384 in + let timings = Hashtbl.create 13 in + let new_wd = + match sysroot, new_wd with + | (Out|Subroot), "" -> "''" + | _, dir -> dir in + List.iter ( + fun x -> + message (f_"Running: %s/%s") hook_name x; + g#write_append log_file (sprintf "Running %s/%s...\n" hook_name x); + let out = ref "" in + let run () = + let outstr = + match sysroot with + | In -> + g#sh (sprintf "/tmp/aux/run-and-log.sh '%s' '' '' '%s'...