Skip to content

Commit

Permalink
Bugfix at holding packages. It used to break if one was not installed…
Browse files Browse the repository at this point in the history
…. Not works ok. Small other fixes.
  • Loading branch information
igorpecovnik committed Sep 24, 2017
1 parent 5f52776 commit 5285727
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions debian-config
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ if [[ $? -ne 0 ]]; then
read -n 1 -s -p "Warning. Configurator can't work properly without internet connection. \
Press CTRL C to stop to stop or any key to ignore and continue."
else
[[ $(dpkg-query -W -f='${db:Status-Abbrev}\n' bc 2>/dev/null) != *ii* ]] && \
[[ $(dpkg-query -W -f='${db:Status-Abbrev}\n' bc 2>/dev/null) != "*ii*" ]] && \
apt-get -qq -y --no-install-recommends install bc
[[ $(dpkg-query -W -f='${db:Status-Abbrev}\n' expect 2>/dev/null) != *ii* ]] && \
[[ $(dpkg-query -W -f='${db:Status-Abbrev}\n' expect 2>/dev/null) != "*ii*" ]] && \
apt-get -qq -y --no-install-recommends install expect
[[ $(dpkg-query -W -f='${db:Status-Abbrev}\n' rcconf 2>/dev/null) != *ii* ]] && \
[[ $(dpkg-query -W -f='${db:Status-Abbrev}\n' rcconf 2>/dev/null) != "*ii*" ]] && \
apt-get -qq -y --no-install-recommends install rcconf
[[ $(dpkg-query -W -f='${db:Status-Abbrev}\n' dialog 2>/dev/null) != *ii* ]] && \
[[ $(dpkg-query -W -f='${db:Status-Abbrev}\n' dialog 2>/dev/null) != "*ii*" ]] && \
apt-get -qq -y --no-install-recommends install dialog
[[ $(dpkg-query -W -f='${db:Status-Abbrev}\n' network-manager 2>/dev/null) != *ii* ]] && \
[[ $(dpkg-query -W -f='${db:Status-Abbrev}\n' network-manager 2>/dev/null) != "*ii*" ]] && \
apt-get -qq -y --no-install-recommends install network-manager
[[ $(dpkg-query -W -f='${db:Status-Abbrev}\n' sunxi-tools 2>/dev/null) != *ii* ]] && \
[[ $(dpkg-query -W -f='${db:Status-Abbrev}\n' sunxi-tools 2>/dev/null) != "*ii*" ]] && \
apt-get -qq -y --no-install-recommends install sunxi-tools
[[ $(dpkg-query -W -f='${db:Status-Abbrev}\n' iptables 2>/dev/null) != *ii* ]] && \
[[ $(dpkg-query -W -f='${db:Status-Abbrev}\n' iptables 2>/dev/null) != "*ii*" ]] && \
apt-get -qq -y --no-install-recommends install iptables
fi

Expand Down
4 changes: 2 additions & 2 deletions debian-config-jobs
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ function jobs ()
TEMP_CONF="/etc/network/interfaces.d/armbian.ap.nat"

# install dnsmas and iptables
if [[ $(dpkg-query -W -f='${db:Status-Abbrev}\n' dnsmasq 2>/dev/null) != *ii* ]]; then
if [[ $(dpkg-query -W -f='${db:Status-Abbrev}\n' dnsmasq 2>/dev/null) != "*ii*" ]]; then
debconf-apt-progress -- apt-get -qq -y --no-install-recommends install dnsmasq;
fi

Expand Down Expand Up @@ -487,7 +487,7 @@ function jobs ()
[[ $BRANCH != "default" ]] && PACKAGE_LIST=$PACKAGE_LIST" linux-dtb$TARGET_BRANCH-$TARGET_FAMILY"

local words=( $PACKAGE_LIST )
apt-mark ${1,,} $PACKAGE_LIST | dialog --backtitle "$BACKTITLE" --title "Packages ${1,,}" --progressbox $((${#words[@]}+2)) 64
for word in $PACKAGE_LIST; do apt-mark ${1,,} $word; done | dialog --backtitle "$BACKTITLE" --title "Packages ${1,,}" --progressbox $((${#words[@]}+2)) 64
fi
;;

Expand Down

0 comments on commit 5285727

Please sign in to comment.