Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Shell Script Resource
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
nikc
n00b
n00b


Joined: 29 Apr 2003
Posts: 23

PostPosted: Fri May 02, 2003 12:48 am    Post subject: Shell Script Resource Reply with quote

Im looking for a good online bash shell script resource so that I can try to figure out how to write some simple scripts.

Anyone know how to make a .sh script run only on a reboot/power on.

Thanks :oops:
Back to top
View user's profile Send private message
dirtyjake
n00b
n00b


Joined: 06 Jul 2002
Posts: 60

PostPosted: Fri May 02, 2003 1:00 am    Post subject: Reply with quote

Quote:
Anyone know how to make a .sh script run only on a reboot/power on.


You mean a rc-script? /etc/init.d has lots of examples. I don't quite know the equivalent of rc.local on Gentoo but an rc-script in /etc/init.d should do you fine.

As for Bash help, Google.
Back to top
View user's profile Send private message
PowerFactor
Veteran
Veteran


Joined: 30 Jan 2003
Posts: 1693
Location: out of it

PostPosted: Fri May 02, 2003 1:14 am    Post subject: Reply with quote

dirtyjake wrote:
I don't quite know the equivalent of rc.local on Gentoo...
/etc/conf.d/local.start for bootup and /etc/conf.d/local.stop for shutdown. Much easier than writing a full blown init script for simple tasks.
Back to top
View user's profile Send private message
Naan Yaar
Bodhisattva
Bodhisattva


Joined: 27 Jun 2002
Posts: 1549

PostPosted: Fri May 02, 2003 1:19 am    Post subject: Reply with quote

This is an excellent online guide.
Back to top
View user's profile Send private message
nikc
n00b
n00b


Joined: 29 Apr 2003
Posts: 23

PostPosted: Fri May 02, 2003 1:39 am    Post subject: Reply with quote

Thats sites looks great im going to start reading now.

As for the start up script I am looking to have a script run anytime the system boots that will email me the ip so if it changes i can still ssh into the computer(its not going to have a monitor pluged in to it)
Back to top
View user's profile Send private message
Naan Yaar
Bodhisattva
Bodhisattva


Joined: 27 Jun 2002
Posts: 1549

PostPosted: Fri May 02, 2003 1:51 am    Post subject: Reply with quote

You may want to investigate dyndns. It is fairly painless and has several update clients including a masked one in portage.
nikc wrote:
...
As for the start up script I am looking to have a script run anytime the system boots that will email me the ip so if it changes i can still ssh into the computer(its not going to have a monitor pluged in to it)
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Fri May 02, 2003 3:29 am    Post subject: Reply with quote

Daniel Robbins has written some bash guides (as well as awk, sed and some others). You can find them here.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum