Hi, I'm experienced with Ubuntu, but I'm trying to create a bash script to automate some common tasks that I do in Linux, but I'm having a bit of trouble figuring out how to make the script interact with aptitude. Here's what I need it to do: Ask for the root password without the user having to type sudo before the command to run the script (I was thinking of having it check the username and if it isn't root yet, prompting for the password -- similar to what happens when you type 'sudo bash'), Check if specific packages that are needed for the rest of the script to work right are installed using aptitude, then if they are installed, reload the package lists and check for updates using 'apt-get update' and 'apt-get upgrade' -- otherwise, prompt the user to either install the packages or exit -- this should be completely automatic). After that, I should once again have it check if the packages were correctly installed and continue running the script. Anyone have any ideas on how to do this?
Bookmarks