Puppet device file

34 views
Skip to first unread message

Sergiu Cornea

unread,
Mar 9, 2015, 1:15:08 PM3/9/15
to puppet...@googlegroups.com
Hello guys,

I am trying to create a device files and I am not really sure if i'm applying the right check.

   exec { "creates_random_file_for_${name}":
      command => "mknod -m 0444 ${dev_random} c 1 9",
      path    => '/usr/local/bin/:/bin/',
      unless  => "/usr/bin/test -c ${dev_random}",
    }

Can someone please guide me in the right direction?

Thank you!

Regards,
Cip

This message and its attachments are private and confidential. If you have received this message in error, please notify the sender and remove it and its attachments from your system.

The University of Westminster is a charity and a company limited by guarantee. Registration number: 977818 England. Registered Office: 309 Regent Street, London W1B 2UW.

Felix Frank

unread,
Mar 10, 2015, 11:40:28 AM3/10/15
to puppet...@googlegroups.com
On 03/09/2015 05:59 PM, Sergiu Cornea wrote:
> Hello guys,
>
> I am trying to create a device files and I am not really sure if i'm
> applying the right check.
>
> exec { "creates_random_file_for_${name}":
> command => "mknod -m 0444 ${dev_random} c 1 9",
> path => '/usr/local/bin/:/bin/',
> unless => "/usr/bin/test -c ${dev_random}",
> }
>
> Can someone please guide me in the right direction?
>
> Thank you!
>
> Regards,
> Cip

Hi,

looks good to me. For debugging this, you can
1. run the commands by hand and
2. use the --debug flag to watch Puppet run them

HTH,
Felix
Reply all
Reply to author
Forward
0 new messages