Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Feb 4th, 2011  |  syntax: None  |  size: 0.99 KB  |  hits: 104  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Modify files in /etc/pam.d
  2.     exec {"modify pam.d":
  3.         command => "bash -c \"cd /etc/pam.d; for i in rlogin rsh; do sed -e 's/pam_rhosts_auth.so *$/pam_rhosts_auto.so promiscuous/' < \$i > \$i.tmp; cmp -s \$i \$i.tmp; if [ \$? = 1 ]; then /bin/cp -f \$i \$i.orig; /bin/cp -f \$i.tmp \$i; /bin/rm -f \$i.tmp; fi; done; exit 0\"",
  4.         cwd     => "/etc/pam.d",
  5.         creates => [ "/etc/pam.d/rlogin.orig", "/etc/pam.d/rsh.orig" ],
  6.         path    => "/bin:/usr/bin:/sbin:/usr/sbin",
  7.     }
  8.  
  9. Message in log file on client:
  10.  
  11. Feb  4 14:45:19 el5u5clt01 puppet-agent[5864]: (/Stage[main]/Rhel5u5-post-install/Exec[modify pam.d]/returns) change from notrun to 0 failed: bash -c "cd /etc/pam.d; for i in rlogin rsh; do sed -e 's/pam_rhosts_auth.so *$/pam_rhosts_auto.so promiscuous/' < $i > $i.tmp; cmp -s $i $i.tmp; if [ $? = 1 ]; then /bin/cp -f $i $i.orig; /bin/cp -f $i.tmp $i; /bin/rm -f $i.tmp; fi; done; exit 0" returned 2 instead of one of [0] at /etc/puppet/manifests/rhel5u5-post-install.pp:31