sometimesfood / chef-admin-essentials

Chef cookbook to install essential admin tools
https://github.com/sometimesfood/chef-admin-essentials
MIT License
5 stars 4 forks source link

Errors on minimal Squeeze install #3

Closed joerg closed 13 years ago

joerg commented 13 years ago

When installing this as explained in the README on a Squeeze machine that does not have the minmal system installed two errors occur. Firstly lsb-release is not installed and thus calling "lsb_release -sc" fails. Secondly sudo is not installed which is why basically the rest of the script fails.

Installing "lsb-release" with git and curl would be a solution to the first error. Using some code like the following would be a solution to the second:

sudo_bin=$(which sudo)

if [ id -u -eq 0 ] then sudo_bin="" else if [ -z $sudo_bin ] then echo "Sorry, you are not root and have no sudo installed" exit 1 fi fi

$sudo_bin aptitude install ....

sometimesfood commented 13 years ago

Why oh why can't every system out there have lsb_release installed? (Yes, I know, dependencies…)

sometimesfood commented 13 years ago

Sorry, accidentally closed this issue.

I am going to keep the current sudo behaviour because otherwise I would have to add sudo detection for both install-chef.sh and standalone-deploy.sh.

I'd like to have a single setup script that calls the other scripts anyway, we can add the sudo check there, once it's done.