[CS-FSLUG] SHELP!!!

Tim Young Tim.Young at LightSys.org
Thu Jul 22 11:00:03 CDT 2004


The problem is actually on the command-line itself.

konsole -e   sudo /sbin/ifdown eth0; /sbin/ifup eth0&

Bash reads the command from left to right.

konsole -e sudo /sbin/ifdown eth0

When it gets to the ; it says, "this comand has ended" and it sends the 
command to the xterm.  Then it runs /sbin/ifup in the background.

The next problem is that sudo only accepts one command at a time.  You will 
either need to bake a bash script that groups them al together or:

konsole -e sudo bash -c "/sbin/ifdown eth0 ; ifup eth0"

Of course, allowing someone to have permission to sudo a bash shell is 
basically allowing them to have root access.  :)

The better way is to have a bash script that runs that you can give them 
sudo access to.

	- Tim

Stephen J. McCracken wrote:

> On Thu, 2004-07-22 at 14:35, K. Luckenbaugh wrote:
> 
>>Takes down eth0, window closes, doesn't bring eth0 back up.
> 
> 
> Not sure of the solution right now (can't remember), but the window
> closing is probably your problem.  When the window closes all contained
> processes die.  I remember hearing a couple of ways to disconnect a
> process so it keeps running after the containing shell dies, but can't
> remember right now how.
> 
> 
> _______________________________________________
> ChristianSource FSLUG mailing list
> Christiansource at ofb.biz
> http://cs.uninetsolutions.com
> 
> 




More information about the Christiansource mailing list