diff --git a/runrole b/runrole index 1f2ef14ff..7477c966d 100755 --- a/runrole +++ b/runrole @@ -33,20 +33,6 @@ if ! grep -q "^""$1""_install: True" $LOCAL_VARS_FILE; then exit 1 fi -clear_marker(){ - if [ ! $1 == "internetarchive" ]; then # special handling - if [ $1 == "calibre-web" ]; then # role directory & installed marker differ - sed -i -e '/^calibreweb/d' $IIAB_STATE_FILE - elif [ $1 == "captive-portal" ]; then # role directory & installed marker differ - sed -i -e '/^captive_portal/d' $IIAB_STATE_FILE - #elif [ $1 == "bluetooth" ]; then # role directory & installed marker differ - # sed -i -e '/^pan_bluetooth/d' $IIAB_STATE_FILE - else - sed -i -e "/^$1/d" $IIAB_STATE_FILE - fi - fi -} - # Needed for Stages 1-3 if not installed yet if [ ! -f $IIAB_STATE_FILE ]; then touch $IIAB_STATE_FILE @@ -75,7 +61,17 @@ else fi if [ "$REINSTALL" == "1" ]; then - clear_marker + if [ ! $1 == "internetarchive" ]; then # special handling + if [ $1 == "calibre-web" ]; then # role directory & installed marker differ + sed -i -e '/^calibreweb/d' $IIAB_STATE_FILE + elif [ $1 == "captive-portal" ]; then # role directory & installed marker differ + sed -i -e '/^captive_portal/d' $IIAB_STATE_FILE + #elif [ $1 == "bluetooth" ]; then # role directory & installed marker differ + # sed -i -e '/^pan_bluetooth/d' $IIAB_STATE_FILE + else + sed -i -e "/^$1/d" $IIAB_STATE_FILE + fi + fi fi if [ $# -eq 2 ]; then