Unable to create lock file

asked 2015-08-31 04:49:06 -0500

ankitjain@freescale.com gravatar image

updated 2015-08-31 10:05:30 -0500

ramindk gravatar image

Hi All,

I have written a script to check update the file & after execution create alok-file under /tmp/ on client side.

class fstab {

  exec { 'Update FSTAB':
    cwd     => '/tmp',
    command => '/mot/systems/scripts/global_scripts/puppte_test.sh',
    creates => '/tmp/alok-file',

But the script is getting executed but the file alok-file is not getting created in /tmp/. Can anyone please let me know why its happening here.

edit retag flag offensive close merge delete


try adding lologoutput => on_failure, to the exec to see if you can tell why it's failing. It would also help if you could add logs from the Puppet run to your question.

ramindk gravatar imageramindk ( 2015-08-31 10:07:48 -0500 )edit

Thanks Ram. I have added this to the exec but still i did not notice any error but the file is not get created in /tmp/ I have also executed the command with debug mode enabled. But dont know how to attach txt file to this thread.

ankitjain@freescale.com gravatar imageankitjain@freescale.com ( 2015-08-31 11:23:21 -0500 )edit

That's fine. Add the content of your puppet_test.sh file to the question though. I'm curious if the .sh file is creating /tmp/alok-file as you say it should be.

ramindk gravatar imageramindk ( 2015-08-31 11:52:28 -0500 )edit

is this class even running? worth adding a notify to send a message showing its running?

sahumphries gravatar imagesahumphries ( 2015-09-01 06:24:03 -0500 )edit