search for: file_exist

Displaying 20 results from an estimated 159 matches for "file_exist".

Did you mean: file_exists
2016 May 26
2
[PATCH] customize: random_seed: avoid one file checking for existing files
...g#is_file file then ( - make_random_seed_file g file; + make_random_seed_file g file ~exists:true; created := true ) ) files; @@ -71,8 +71,11 @@ let rec set_random_seed (g : Guestfs.guestfs) root = !created -and make_random_seed_file g file = - let file_exists = g#is_file file in +and make_random_seed_file ?exists g file = + let file_exists = + match exists with + | None -> g#is_file file + | Some b -> b in let n = if file_exists then ( let n = Int64.to_int (g#filesize file) in -- 2.5.5
2012 Feb 22
4
Custom function issue
Hi, I needed a function to check if a file is existing on the Debian box I am configuring. So I used this one module Puppet::Parser::Functions newfunction(:file_exists, :type => :rvalue) do |args| if File.exists?(args[0]) return 1 else return 0 end end end It work greats for some service where apache2 doesn''t work for me. I am using it this way "file_exists(''/etc/init.d/apache2'') == 1" if this re...
2007 May 28
1
Rails matcher render_template is wrong when using GetText, looking for flexible solution
...html"). The source of this mismatch is that GetText overrides ActionView::Base.render_file, testing each possible localized template path and passes the first existing path to the original render_file method : return render_file_without_locale(localized_path, use_full_path, local_assigns) if file_exists? localized_path This line always evaluates to true in RSpec context, but to false in the application. After a lot of digging I found out that RspecOnRails overrides file_exists? with a stub when integrate_views is not set (lib/spec/rails/dsl/behaviour/controller.rb:57): @template.stub!(:file_e...
2020 May 15
1
[PATCH] v2v: fix UEFI bootloader for linux guests
...in + arch_suffix + +(* Function fixes uefi boot. It's used in both cases: legacy grub and grub2 *) +let fix_uefi g distro distro_ver grub_config arch = + let cant_fix_uefi () = ( + info (f_"Can't fix UEFI bootloader. VM may not boot."); + "" ) in + + let file_exists file = + if g#exists file then + true + else ( + info (f_"Can't find file: '%s' needed for UEFI bootloader fixing") file; + false ) in + + let grub_path = String.sub grub_config 0 (String.rindex grub_config '/') in + let uefi_fallb...
2012 Jun 08
18
[PATCH 0 of 4 RFC] Populate-on-demand: Check pages being returned by the balloon driver
Populate-on-demand: Check pages being returned by the balloon driver This patch series is the second result of my work last summer on decreasing fragmentation of superpages in a guests'' p2m when using populate-on-demand. This patch series is against 4.1; I''m posting it to get feedback on the viability of getting a ported version of this patch into 4.2. As with the previous
2020 Jul 24
3
[PATCH v2] v2v: fix UEFI bootloader for linux guests
...Some "X32" + | _ -> None + in + + match get_uefi_arch_suffix inspect.i_arch with + | None -> cant_fix_uefi () + | Some suffix -> ( + let uefi_fallback_name = + sprintf "%sBOOT%s.EFI" uefi_fallback_path suffix in + + let file_exists file = + if g#exists file then + true + else ( + info (f_"Can't find file: '%s' needed for UEFI fixing") + file; + false ) + in + + let grub_config = bootloader#get_config_file () in + + l...
2010 Nov 08
11
Default ownership for static files
Hi, I try to serve a file file { "/root/test3.txt": ensure => file, source => "puppet:///yum/test.txt", } On the puppetmaster this files look like this #$ ls -n test.txt -rw-r--r-- 1 502 301 4 8 Nov 16:25 test.txt Finally, here is my question: What ownership may I expect on the resulting file ? Actually this is the result for me: #$ ls -l
2008 Sep 05
8
Gluster update | need your support
Dear Members, Even though Gluster team is growing at a steady phase, our aggressive development schedule out phases our resources. We need to expand and also maintain a 1:1 developer / QA engineer ratio. Our major development focus in the next 8 months will be towards: * Large scale regression tests (24/7/365) * Web based monitoring and management * Hot upgrade/add/remove of storage nodes
2016 May 26
0
Re: [PATCH] customize: random_seed: avoid one file checking for existing files
...file g file; > + make_random_seed_file g file ~exists:true; > created := true > ) > ) files; > @@ -71,8 +71,11 @@ let rec set_random_seed (g : Guestfs.guestfs) root = > > !created > > -and make_random_seed_file g file = > - let file_exists = g#is_file file in > +and make_random_seed_file ?exists g file = > + let file_exists = > + match exists with > + | None -> g#is_file file > + | Some b -> b in > let n = > if file_exists then ( > let n = Int64.to_int (g#filesize file) in Seem...
2007 May 23
2
rspec mocha and controller specs without integrated_views
...lems. On my controller specs, I am forced to ''integrate_views'' as the following code below shows you, the mocking of views is rspec specific. See stub! versus mocha''s stub unless block_given? unless integrate_views? @template.stub!(:file_exists?).and_return(true) @template.should_receive(:render_template).any_number_of_times.and_return(true) { |*args| @first_render ||= args[2] } @template.stub!(:find_template_extension_for).and_return("rhtml") @template....
2017 Feb 22
5
[PATCH 0/4] v2v: windows: Only try to install rhev-apt if the target is RHV (RHBZ#1161019).
The bug is: https://bugzilla.redhat.com/show_bug.cgi?id=1161019 This makes a few other minor refactorings to the code. Rich.
2011 Jun 15
2
[PATCH 1/2] use apt-get instead of aptitude
...apt-get],[no]) AC_CHECK_PROG(DPKG,[dpkg],[dpkg],[no]) dnl For ArchLinux handler. diff --git a/febootstrap_debian.ml b/febootstrap_debian.ml index f0d0be5..745a383 100644 --- a/febootstrap_debian.ml +++ b/febootstrap_debian.ml @@ -30,7 +30,7 @@ let tmpdir = tmpdir () let debian_detect () = file_exists "/etc/debian_version" && - Config.aptitude <> "no" && Config.dpkg <> "no" + Config.apt_get <> "no" && Config.dpkg <> "no" let debian_resolve_dependencies_and_download names = let cmd = @@...
2014 Mar 15
4
[supermin 1/2] chroot: Fix corner case introduced with dpkg-divert support
...2 deletions(-) diff --git a/src/chroot.ml b/src/chroot.ml index b5c1e53..9e522d9 100644 --- a/src/chroot.ml +++ b/src/chroot.ml @@ -26,7 +26,9 @@ let build_chroot debug files outputdir = List.iter ( fun file -> try - let path = file.ft_source_path in + let path = if file_exists file.ft_source_path + then file.ft_source_path + else file.ft_path in let st = lstat path in let opath = outputdir // file.ft_path in match st.st_kind with @@ -68,7 +70,10 @@ let build_chroot debug files outputdir = (* Second pass: fix up directory p...
2011 Oct 18
5
[PATCH febootstrap] Some cleanups for Debian and Ubuntu
I just tried to get libguestfs to compile on Ubuntu 11.10 using the latest febootstrap, and the following patches were necessary for me. They are all just reasonable code cleanups *except* for patch 5/5 which is a gross hack for something I don't understand about how Ubuntu 11.10 multiarch support works. Rich.
2018 May 18
2
[PATCH] RFC: v2v: use RHV Setup Tools ISO if available
...d to get the @@ -239,12 +243,15 @@ let convert (g : G.guestfs) inspect source output rcaps = (* Install RHEV-APT only if appropriate for the output hypervisor. *) if output#install_rhev_apt then ( - let tool_path = virt_tools_data_dir () // "rhev-apt.exe" in - if Sys.file_exists tool_path then - configure_rhev_apt tool_path - else - warning (f_"%s is missing, but the output hypervisor is oVirt or RHV. Installing RHEV-APT in the guest would mean the guest is automatically updated with new drivers etc. You may wish to install RHEV-APT manually afte...
2015 Mar 18
5
[PATCH 0/2] [RFE] virt-builder should support download resume
This patchset adds support for resuming downloads in virt-builder. Partially downloaded file is not deleted on exit anymore. There is a check for partially downloaded image in cache directory based on its name. When found, download_to crafts appropriate options to continue its download. Maros Zatko (2): mllib: allow external_command to return [] on nonzero return value builder: support for
2005 Oct 10
6
Dangling MS Access DB Lock Files *.ldb
I have an intermittent problem with dangling MS Access DB lock files. In a productive environment with N batch queus (each on a separate Windows XP Professional) a scheduler PC dispatches the work load to a free queue by means of modifying a simple MS Access DB file called "PRIM.mdb", which resides on a Samba 3.0.20 share. Each free queue PC polls the same MS Access DB file every 60
2007 Jan 19
0
[PATCH] Update pygrub for new Solaris directory names
...ygrub/src/pygrub b/tools/pygrub/src/pygrub --- a/tools/pygrub/src/pygrub +++ b/tools/pygrub/src/pygrub @@ -503,7 +503,7 @@ def run_grub(file, entry, fs): # If nothing has been specified, look for a Solaris domU. If found, perform the # necessary tweaks. def sniff_solaris(fs, cfg): - if not fs.file_exists("/platform/i86xen/kernel/unix"): + if not fs.file_exists("/platform/i86xpv/kernel/unix"): return cfg # darned python @@ -516,10 +516,10 @@ def sniff_solaris(fs, cfg): longmode = True if not cfg["kernel"]: - cfg["k...
2007 Nov 06
1
Help: Asterisk info
I am getting this error under system info: File Line Command Message common_functions.php 314 file_exists(/proc/scsi/scsi) the file does not exist on your machine Does anybody know how to fix this? Thank you in advance Jarga -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20071106/8553aa71/attachment.htm...
2011 Mar 23
1
Tinc graph and label info.
Hi, I use tinc with the option GraphDumpFile=/etc/tinc/ci00036/grapd.dot In the graph there is the label section: ci00036 [label = "ci00036"]; ci00037 [label = "ci00037"]; ci00038 [label = "ci00038"]; Is there an option to set the label in the tinc config file or host file to a custom text ? Something that is easy to read and has some meaning