LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 05-06-2003, 10:47 AM   #1
roofy
Member
 
Registered: Apr 2003
Location: Florida
Distribution: Redhat 7.2
Posts: 222

Rep: Reputation: 30
shell scripts...


whats a shell script that slackware reads upon starting up no matter who logs in?
 
Old 05-06-2003, 10:53 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967
depends exactly what you mean really, /etc/bashrc will be read on EVERY login if that's what you want...
 
Old 05-06-2003, 11:00 AM   #3
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
It actually would be /etc/profile in Slackware as .bashrc in a users home directory doesn't exist in Slack until its created. So by default, your looking for the global file /etc/profile

But that's if like acid mentioned in what your looking for. Are you specifically looking for the script that starts after someone logins to set their defaults or you looking for a script that occurs before a person logs in? Cause there are many others that occur before a person actually logs in.
 
Old 05-06-2003, 11:17 AM   #4
roofy
Member
 
Registered: Apr 2003
Location: Florida
Distribution: Redhat 7.2
Posts: 222

Original Poster
Rep: Reputation: 30
well i have 2 daemons that i need started at startup
 
Old 05-06-2003, 11:24 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967
wel exactly.... that is nothign at all to do with users, and would be started when the system boots, so things like /etc/profile are wrong. can't bloody remember where slack puts their stuff though... duff distro that it is....
 
Old 05-06-2003, 12:03 PM   #6
roofy
Member
 
Registered: Apr 2003
Location: Florida
Distribution: Redhat 7.2
Posts: 222

Original Poster
Rep: Reputation: 30
yea i realized that...lol...slackware completely ignores any filesystem standard what so ever...i might just back to my 7.2
 
Old 05-06-2003, 01:43 PM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967
Quote:
Originally posted by roofy
yea i realized that...lol...slackware completely ignores any filesystem standard what so ever...i might just back to my 7.2
it doesn't, the other's do.... slackware was always designed to be as UNIX compliant as possible, everyone else just copied redhat
 
Old 05-06-2003, 02:33 PM   #8
roofy
Member
 
Registered: Apr 2003
Location: Florida
Distribution: Redhat 7.2
Posts: 222

Original Poster
Rep: Reputation: 30
oh ok...then why is it that all software i dl only works on non slack systems?
 
Old 05-06-2003, 03:10 PM   #9
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,564
Blog Entries: 54

Rep: Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927
well i have 2 daemons that i need started at startup
If it's network daemons, shouldn't that be in one of /etc/rc.d/rc.inet.*? Else rc.S in the same dir.
 
Old 05-06-2003, 03:25 PM   #10
roofy
Member
 
Registered: Apr 2003
Location: Florida
Distribution: Redhat 7.2
Posts: 222

Original Poster
Rep: Reputation: 30
i put em in /etc/rc and it seems to work fine, thanks guys
 
Old 05-06-2003, 03:32 PM   #11
roofy
Member
 
Registered: Apr 2003
Location: Florida
Distribution: Redhat 7.2
Posts: 222

Original Poster
Rep: Reputation: 30
i was wondering what command in a shell script would run the contents of another shell script?
 
Old 05-06-2003, 04:19 PM   #12
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967
you can source a script file (like an include call in c basically) by ". filename" but generally you'd just run it like in a terminal
 
Old 05-06-2003, 07:01 PM   #13
roofy
Member
 
Registered: Apr 2003
Location: Florida
Distribution: Redhat 7.2
Posts: 222

Original Poster
Rep: Reputation: 30
well what i want to do is make a call in the rc script to another file where id have the paths to all the daemons id install (i.e /usr/local/bin/apache2/bin/apachectl start)
 
Old 05-06-2003, 07:06 PM   #14
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,000
Blog Entries: 11

Rep: Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893
Quote:
Originally posted by roofy
well what i want to do is make a call in the rc script to another file where id have the paths to all the daemons id install (i.e /usr/local/bin/apache2/bin/apachectl start)
Usually in Slack /etc/rc.d/rc.M would call
/etc/rc.d/rc.httpd ... :)

Slack's concept of init scripts is pretty
simple and transparent, really... I'd prefer
the bsd style over sysV anytime ;)

If you install stuff from source you'll probably
want to start processes from /etc/rc.d/rc.local

Cheers,
Tink
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with shell scripts thorney Linux - Newbie 4 11-28-2005 12:18 AM
Shell Scripts benwy Linux - Software 1 06-09-2003 03:58 AM
Shell scripts j0hn0n1 Linux - Software 1 01-03-2003 04:11 PM
shell scripts nautilus_1987 Linux - General 3 08-30-2002 04:12 AM
shell scripts gui10 Programming 10 10-28-2001 03:46 AM


All times are GMT -5. The time now is 05:12 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration