Permalink
Browse files

added some doc for tty option

  • Loading branch information...
1 parent ed59bcc commit f8803f5cab313afc9e9e1bde189baaf8cfd2c00f @liseen liseen committed Aug 19, 2011
Showing with 13 additions and 4 deletions.
  1. +6 −3 README
  2. +3 −0 bin/atnodes
  3. +4 −1 lib/SSH/Batch.pm
View
@@ -47,6 +47,9 @@ SYNOPSIS
# or prompt for password if sudo required...
$ atnodes 'sudo apachectl restart' '{ps}' -w
+ # run sudo command if tty required...
+ $ atnodes -tty 'sudo apachectl restart' '{ps}'
+
# or specify a timeout:
$ atnodes 'ping foo.com' '{ps}' -t 3
@@ -188,9 +191,9 @@ TIPS
sudo: sorry, you must have a tty to run sudo
- then you should probably comment out the "Defaults requiretty" line
- in your server's /etc/sudoers file (or just do this for your own
- account).
+ then you should add option -tty, or you can probably comment out the
+ "Defaults requiretty" line in your server's /etc/sudoers file (best
+ just to do this for your own account).
Passing custom options to the underlying "ssh"
By default, "atnodes" relies on Net::OpenSSH to locate the OpenSSH
View
@@ -312,6 +312,9 @@ atnodes - Run commands on clusters
# or prompt for password if sudo required...
$ atnodes 'sudo apachectl restart' '{ps}' -w
+ # run sudo command if tty required...
+ $ atnodes -tty 'sudo apachectl restart' '{ps}'
+
# or specify a timeout:
$ atnodes 'ping foo.com' '{ps}' -t 3
View
@@ -63,6 +63,9 @@ Run command on clusters. (atnodes calls fornodes internally.)
# or prompt for password if sudo required...
$ atnodes 'sudo apachectl restart' '{ps}' -w
+ # run sudo command if tty required...
+ $ atnodes -tty 'sudo apachectl restart' '{ps}'
+
# or specify a timeout:
$ atnodes 'ping foo.com' '{ps}' -t 3
@@ -188,7 +191,7 @@ If you see the following error message while doing sudo with L<atnodes>
sudo: sorry, you must have a tty to run sudo
-then you should probably comment out the "Defaults requiretty" line in your server's F</etc/sudoers> file (or just do this for your own account).
+then you should add option -tty, or you can probably comment out the "Defaults requiretty" line in your server's F</etc/sudoers> file (best just to do this for your own account).
=item Passing custom options to the underlying C<ssh>

0 comments on commit f8803f5

Please sign in to comment.