xorl has asked for the wisdom of the Perl Monks concerning the following question:
I have a script that runs on boot. It basically takes some info, puts it into a text file, and then puts the text file on another box.
The line of code that produces the stty: standard input: Invalid argument error is
system("sudo -u username scp /tmp/bootbox21.txt mybox.mydomain:/export +/home/username/");
I first though this was caused by sudo trying to run one of the .bashrc or .bash_profile files. In /etc/bashrc I commented out the two lines which have an stty command, but that didn't help. Actually I didn't think it would since, they're only run if it is a login shell. There is no /etc/bash_profile. I then thought that ~/username/.bash_profile might have some problem (there is no .bashrc file for the user). I eventually went so far as to completely rename it so it wouldn't be found. Still no luck.
So now I'm starting to wonder if it isn't some weird perl gotcha with the system command using sudo. Can anyone help with this?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: stty: standard input: Invalid argument
by PreferredUserName (Pilgrim) on Mar 06, 2006 at 14:32 UTC | |
by xorl (Deacon) on Mar 06, 2006 at 17:11 UTC | |
by PreferredUserName (Pilgrim) on Mar 07, 2006 at 16:04 UTC | |
|
Re: stty: standard input: Invalid argument
by Tanktalus (Canon) on Mar 06, 2006 at 14:34 UTC | |
|
Re: stty: standard input: Invalid argument
by glasswalk3r (Friar) on Mar 06, 2006 at 14:41 UTC |