From 7f46c3828992c6128c70c3d5ff00dae65bd4b685 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Sat, 13 Oct 2012 12:08:06 +0100 Subject: [PATCH] Lucid's `add-apt-repository` does not support `-y` --- bootstrap-salt-minion.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bootstrap-salt-minion.sh b/bootstrap-salt-minion.sh index 8f48328..3b4fb60 100644 --- a/bootstrap-salt-minion.sh +++ b/bootstrap-salt-minion.sh @@ -45,8 +45,12 @@ if [ "$UNAME" = "Linux" ] ; then log "Installing for Ubuntu Lucid/Precise." do_with_root apt-get update do_with_root apt-get -y install python-software-properties - do_with_root add-apt-repository -y ppa:saltstack/salt - do_with_root apt-get update + if [ $CODENAME = 'lucid' ]; then + do_with_root add-apt-repository ppa:saltstack/salt + else + do_with_root add-apt-repository -y ppa:saltstack/salt + fi + do_with_root apt-get update do_with_root apt-get -y install salt-minion else log "Ubuntu $CODENAME is not supported." @@ -91,4 +95,4 @@ if [ "$UNAME" = "Linux" ] ; then fi log "Salt has been installed!" -trap - EXIT \ No newline at end of file +trap - EXIT