search for: filetest

Displaying 20 results from an estimated 35 matches for "filetest".

Did you mean: file_test
2011 Jan 03
23
Managing cronjobs as a file in solaris with appendifnosuchline for specific servers
I want to manage cronjobs as a " file " in solaris through puppet and not using the puppet cron resource. I will be managing the file /var/spool/cron/crontabs/root. I want the cron file to be same across all servers except some servers will have additional cron entries. How can I append to the file /var/spool/cron/crontabs/root , something like appendifnosuchline in cfengine? Can
2011 Apr 25
1
possible minor doc clarification?
Good afternoon, As a clarification does it make sense to remove the second 'not' in the 'See Also' documentation for file_test ? Kind regards, Sean O'Riordain ----- Index: src/library/utils/man/filetest.Rd =================================================================== --- src/library/utils/man/filetest.Rd (revision 55639) +++ src/library/utils/man/filetest.Rd (working copy) @@ -35,7 +35,7 @@ } \seealso{ \code{\link{file.exists}} which only tests for existence - (\code{test -e} on so...
2007 Aug 20
1
SimpleTextRecipes
...ec { "/usr/bin/perl -p0i -e ''s/^/$line\n/;'' ''$file''": unless => "grep -Fxqe ''$line'' ''file''", path => "/bin:/usr/bin:/usr/local/bin", } } in classes/fileTest.pp: class fileTest { file { "/puppetTestFile": ensure => present, } append_if_no_such_line { appendtest: file => "/puppetTestFile", line => "this is the append test", }...
2006 Feb 03
3
rubystandard library question
I have a problem getting find.rb and fileutils.rb to coexist in the same script. When I require both I get the following: /usr/lib/ruby/1.8/find.rb:36:in `dup'': can''t dup NilClass (TypeError) from /usr/lib/ruby/1.8/find.rb:36:in `find'' from /usr/lib/ruby/1.8/find.rb:36:in `find'' I googled for this problem and did not come across any place
2012 Jul 17
8
How to override $::operatingsystem fact
...$::operatingsystem. "Proxmox" is based on Debian, so the normal value is currently "Debian". To change that, I just write a custom fact based on the facter fact "operatingsystem" Facter.add(:operatingsystem) do > ... > setcode do > ... > elsif FileTest.exists?("/usr/bin/pveversion") > "Proxmox" This method doesn''t override the original fact. I''ve also tried to set $::operatingsystem = "Proxmox" directly in my node. What''s the best way to do override an existing fact ? Regards...
2015 Apr 25
2
vs_fruit - can't write to share
...the share. In addition i tried the following share definition: vfs objects = catia fruit streams_xattr fruit:locking = netatalk streams_xattr:prefix = user. streams_xattr:store_stream_type = no kernel oplocks = no The other definitions i use are: path=/path/to/share browseable=yes admin users = @filetest valid users = @filetest writable = yes guest ok = no force user = root force group = basegroup create mode = 0775 directory mode = 0775 It is not possible to write to the share at best at the first time i click on save. Sometimes i get 0 Byte files and with a plain text file the initial content is...
2003 Aug 24
2
wxRuby 0.1.0 Alpha has been released!
http://rubyforge.org/project/showfiles.php?group_id=35&release_id=46 The code itself has been quite stable for several weeks. This release includes Gour''s excellent MinGW README notes, along with various updates to the README, and clarification of the LICENSE. Thanks to everyone for your help in putting this together. It was definitely a team project. I look forward to getting lots
2003 Apr 30
2
Working comfortably with (X)Emacs + Sweave
Dear List, I am trying to become more familiar with Sweave at the moment, beacuse I am convinced that it will eventually make my life easier. However, I have not found anything relevant in the mail archives about the following problem. Both the article in R-News and the Sweave FAQ suggest that Emacs would be a great development environment for working with Sweave. So far, it doesn't seem to
2007 Jun 20
1
Help With Sweave:
Hi All, I am running Ubuntu Feisty (7.04) on a Thinkpad T41. I've installed the nowebm package for Ubuntu. Working from this HowTo: http://www.ci.tuwien.ac.at/~leisch/Sweave/example-1.Snw I try to compile the example *.Snw as in the Sweave manual: mdj at lapmdj:~/Desktop/Sweave/example1$ noweb example-1.Snw Can't open output file Despite the error, a *.tex file is produced. Now I am
2013 Aug 28
3
passing hiera data to custom fact
...ion). I''m installing a cluster and need to get the master IP and if I can set the hostname as a fixed known information the IP will be variable since I''m installing it in a cloud environment The custom facter code is: # master_ip.rb: # require ''facter'' if FileTest.exists?("/usr/bin/dig") cmd = sprintf(''/usr/bin/dig +short HERE_GOES_THE PARAMETRIC_HOSTNAME'') result = `#{cmd}` Facter.add("master_ip") do setcode { result } end end Any Idea on how to refer to a data present in the module like $mast...
2006 May 02
4
Indexing Speed?
...as lucene takes ~60 seconds. I''m using the standard "get you started" sort of code provided by both libraries. My ruby code is: (abridged) @index = Index::Index.new(:path => inIndexPath) def createIndex(inRepositoryPath) Find.find(inRepositoryPath) do |path| if FileTest.file?(path) File.open(path) do |file| @index.add_document(:file =>path, :content => file.readlines) end My Java code is basically a direct port. Has anyone else noticed this difference in speed? Am I doing something wrong? Is this speed normal? Any advice grate...
2019 Aug 21
3
CentOS 5 file system read only issue
Hello Everyone, We are using CentOS 5 system for certain application. Those are VM guests running in VMware. There is datastore issue occasionally, causing all file systems becoming read only file systems. So application stop working, and opened files cannot be written either. We cannot even ssh login to the system. Typically we had to power cycle the VM. We are trying to add reliability to the
2015 Apr 25
0
vs_fruit - can't write to share
...the share. In addition i tried the following share definition: vfs objects = catia fruit streams_xattr fruit:locking = netatalk streams_xattr:prefix = user. streams_xattr:store_stream_type = no kernel oplocks = no The other definitions i use are: path=/path/to/share browseable=yes admin users = @filetest valid users = @filetest writable = yes guest ok = no force user = root force group = basegroup create mode = 0775 directory mode = 0775 It is not possible to write to the share at best at the first time i click on save. Sometimes i get 0 Byte files and with a plain text file the initial content is...
2003 Dec 27
2
Bug report: rsync does not always discriminate upper and lower case
Hi, I found this surprising behavior with rsync (version 2.5.7 protocol version 26) on Mac OS X (Panther, 10.3.2) : Suppose you have a folder "Source" containing a file named "abc", and its backup as folder "Clone", created by rsync : rsync -a ~/Desktop/Source/ ~/Desktop/Clone Now change the name of file "abc" into "ABC" and re-sync :
2008 Oct 14
2
Fact load failure
Hi, I''ve created this fact: require ''facter'' if FileTest.exists?("/etc/ha.d") if `service heartbeat status` =~ /running/ cib = `cibadmin -Q`.grep(/epoch/).to_s epoch = cib.scan(/[0-9]+/).first Facter.add("cib_epoch") do setcode do epoch.to_i + 1 end end end end end I''ve...
2007 Jul 01
1
rspec for the svn-less (ruby version)
...ts puts "Rspec tarball (" + rspec + ") does not exist in the current directory" puts exit 1 end if ! File.exist?(rspecrails) then puts puts "Rspec-rails tarball (" + rspecrails + ") does not exist in the current d irectory" puts exit 1 end if FileTest.directory? app + "/vendor/plugins" then system("tar","zxvf", rspec) system("tar","zxvf", rspecrails) cwd = Dir.pwd Dir.chdir(app + "/vendor/plugins") File.move(cwd + "/" + File.basename(rspec,".tgz"),app...
2007 Jul 16
9
DRBD facts
Hi, I can''t find a way to add a page on the wiki (i''m logged in but there is no edit button on the facter recipes page), so here is a recipe for DRBD. It has been tested on version 0.8.4. Can someone publish it on the web site? if FileTest.exists?("/proc/drbd") result = {} Thread::exclusive do File.readlines("/proc/drbd").each do |l| if l =~ /(\d+): cs:Unconfigured/ device = $1 result["drbdconnectionstate#{device}"] = "Unconfigured" elsif l =~ /(\d+): cs:(\...
2005 Mar 14
4
[SMB 3.0.10] File Locking Mechanism Windows <-> Unix
...39;fuser' command in such a situation ( when both had exclusive accesses to the file) and to my surprise I found that both smbd and the unix process are listed bash-2.05# fuser /export/home/Testdev/share/test.txt /export/home/Testdev/share/test.txt: 1655o 1567o bash-2.05# ps -e | grep filetest 1655 pts/5 0:00 filetest bash-2.05# ps -e | grep 1567 1567 ? 0:00 smbd Also I tried to rename the file when only samba was locking it . The rename was successful. This is not possible if only unix process (filetest) is locking it. It will fail with a Permission denied error. Can any...
2006 Jan 03
1
RequireResourceHelper for JS and CSS
...#39;'js''} path = "#{RAILS_ROOT}/public/#{resource_type.to_s.pluralize}/" candidates = [ "#{controller.controller_name}", "#{controller.controller_name}_# {controller.action_name}" ] for candidate in candidates if FileTest.exist?("#{path}/#{candidate}.#{extension || extensions[resource_type]}") require_resource(resource_type, candidate) end end end def stylesheet_auto_link_tags autorequire(:stylesheet) @stylesheets.uniq.inject("") do |buffer, css| buf...
2007 Mar 30
7
subversion and /etc/puppet
I''m trying to come up with a way to manage /etc/puppet on the Puppet server from my workstation. My idea was to place all of /etc/puppet into subversion, check it out to my workstation, commit via ssh, and then use a post-commit to update /etc/puppet. That way any time I made a change in /etc/puppet it would be immediately updated and ready for the next puppetd run. Problem is the