Forum: CFEngine Help Subject: Re: querying mountpoints Author: juriskrumins Link to topic: https://cfengine.com/forum/read.php?3,26982,26996#msg-26996
davidlee: Seems like You're right regarding zero-length file issue. At least in my case using 3.3.5 version it doesn't work as expected: # cat promises.cf readmount.cf body common control { bundlesequence => { "readmount", }; inputs => { "cfengine_stdlib.cf", "readmount.cf", }; } bundle agent readmount { vars: "proc_mounts" slist => readstringlist("/proc/mounts","#[^\n]*","\n",10,4000) ; "tmp_mounts" slist => readstringlist("/tmp/mounts","#[^\n]*","\n",10,4000) ; reports: linux:: "proc: $(proc_mounts)"; "tmp: $(tmp_mounts)"; } # cf-agent -V @@@ @@@ cf-agent @ @@@ @ CFEngine Core 3.3.5 @ @@@ @ @ @@@ @ @ @ @@@ @ @ @ @ @ @ Copyright (C) CFEngine AS 2008-2012 See Licensing at http://cfengine.com/3rdpartylicenses # cf-agent -KI R: proc: $(proc_mounts) R: tmp: proc /proc proc rw,relatime 0 0 R: tmp: sysfs /sys sysfs rw,relatime 0 0 R: tmp: devtmpfs /dev devtmpfs rw,relatime,size=497380k,nr_inodes=124345,mode=755 0 0 R: tmp: devpts /dev/pts devpts rw,relatime,gid=5,mode=620,ptmxmode=000 0 0 R: tmp: tmpfs /dev/shm tmpfs rw,relatime 0 0 R: tmp: /dev/mapper/vg_rhel6_01-lv_root / ext4 rw,relatime,barrier=1,data=ordered 0 0 R: tmp: /proc/bus/usb /proc/bus/usb usbfs rw,relatime 0 0 R: tmp: /dev/vda1 /boot ext4 rw,relatime,barrier=1,data=ordered 0 0 R: tmp: none /proc/sys/fs/binfmt_misc binfmt_misc rw,relatime 0 0 R: tmp: beancounter /proc/vz/beancounter cgroup rw,relatime,blkio,name=beancounter 0 0 # Probably will be in 3.4.0 _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine