[Novalug] Installing rpms via an automated script

Dan Lavu dan@lavu.net
Sun Mar 11 15:45:36 EDT 2012


James,

 

I'm pretty sure I know what the issue is, sudo by default requires a tty
session, you can edit your sudoers file and disable require notty, that
should fix it. If that doesn't work, you can run your script and put the
following at the '$script > $log.file  2&<1' and it will redirect all the
default output to a text file so you can find out what is holding you up.

 

Dan

 

From: novalug-bounces@calypso.tux.org
[mailto:novalug-bounces@calypso.tux.org] On Behalf Of James Swanson
Sent: Sunday, March 11, 2012 3:35 PM
To: NOVALUG
Subject: [Novalug] Installing rpms via an automated script

 

This has me tearing my hair out.  I've built an automated script.  I have
the user set up to sudo with no password.  The script works fine until I get
to the rpm installs.  I've put "sudo rpm -ivh /path/to/X.rpm" and I've put
"sudo yum -y install /path/to/X.rpm"  with not success.  When I'm logged in
as the user, I can run the script just fine, but automated?  Nope.  Yes,
I've set up environment variables.  Am I missing something?

 

Jim

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.firemountain.net/pipermail/novalug/attachments/20120311/e9b4531d/attachment.htm>


More information about the Novalug mailing list