sidux.com
Menu

News

Give back
Last 3 Contributions
16-11-2008 10.00
02-11-2008 20.00
31-10-2008 20.00

Donate


Sponsor
hetzner.de

Languages
Preferred language:



Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
zonker
Post subject: script that restarts the network, how do i do it?  PostPosted: Oct 12, 2007 - 11:54 AM



Joined: Dec 02, 2006
Posts: 153
Location: Copenhagen, Denmark
Status: Offline
Never did a script before, so here goes: wifes laptop now and then looses the connection to the router (wireless), this is fixed by restarting it. Opening a console, getting root permissions and restarting the network interface is more complicated than my wife is willing to learn about her operating system, so i need to write a small script that does the job after prompting her for the root password, like
Code:
#!/bin/bash
/etc/initd/networking restart

-But how do i make the script prompt for root password before executing?

_________________
linuxuser 377268
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
michaaa62
Post subject:   PostPosted: Oct 12, 2007 - 12:40 PM



Joined: Feb 24, 2007
Posts: 673
Location: Berlin, Germany
Status: Offline
Just create a starter in your panel or on the desktop, that runs
Code:
kdesu /etc/init.d/networking restart
fetch a nice little icon for it and you are done.

cheers Micha

_________________
http://sidux.com/PNphpBB2-viewtopic-t-2403.html
 
 View user's profile Send private message  
Reply with quote Back to top
dedo
Post subject:   PostPosted: Oct 12, 2007 - 01:01 PM



Joined: Dec 06, 2006
Posts: 219
Location: Italy
Status: Offline
even better thanks to slh:
Code:

su-me "/etc/init.d/networking restart"

_________________
sidux-it
 
 View user's profile Send private message Send e-mail MSN Messenger  
Reply with quote Back to top
zonker
Post subject:   PostPosted: Oct 12, 2007 - 07:43 PM



Joined: Dec 02, 2006
Posts: 153
Location: Copenhagen, Denmark
Status: Offline
thank you, that did the job Smile

_________________
linuxuser 377268
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
VernDog
Post subject:   PostPosted: Apr 15, 2008 - 12:06 AM



Joined: Mar 28, 2008
Posts: 51

Status: Offline
I needed this. I have sidux installed in another room and invariably I forget to plug in the network cable into my hub. I wait and eventually it starts, but this will save me some time. Thank you.
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2007 The PNphpBB Group
Credits
 
Logos and trademarks are the property of their respective owners, comments are property of their posters, the rest is © 2006-2008 by sidux e.V., 10407 Berlin, Kniprodestr. 104. sidux e.V. is a Berlin, Germany based non-profit foundation. Consult Impressum and Legal Terms for details. sidux™ is Free Software released under the GNU/GPL license and other compatible licenses.
powered by Zikula & Zafenio