Results 1 to 4 of 4
Hi!
I want to write a Bash script to check (on startup) and install some packages automatically if they are not installed.
Someone helps me please!!!...
- 09-12-2007 #1Just Joined!
- Join Date
- Aug 2007
- Posts
- 3
Bash script for installing packages automatically??
Hi!
I want to write a Bash script to check (on startup) and install some packages automatically if they are not installed.
Someone helps me please!!!
- 09-14-2007 #2Linux Engineer
- Join Date
- Feb 2005
- Posts
- 1,044
Well, you could use the exit status from "rpm -q packagename >/dev/null 2>&1" to check the presence of packages (it returns 0 (true) if the package you're querying is present and 1 it it's not), and then call yum to get and install them (assuming you're having more success with yum than I am). Put a call to your script in rc.local and you're done!
- 09-14-2007 #3Just Joined!
- Join Date
- Aug 2007
- Posts
- 3
Thanks for replying my post, scm!
But I'm using Debian and Ubuntu. Can you tell me how to do that?
- 09-15-2007 #4


Reply With Quote