Commit 1f96cf8e authored by Igor Pecovnik's avatar Igor Pecovnik
Browse files

Remove deprecated functions from configurator, few bugfixes, desktop install

parent fb10c98b
...@@ -139,18 +139,6 @@ function jobs () ...@@ -139,18 +139,6 @@ function jobs ()
;; ;;
# Install build essentials
#
"Development" )
if [[ -n $(dpkg -l | grep build-essential) ]]; then
debconf-apt-progress -- apt-get -y remove build-essential
debconf-apt-progress -- apt-get -y autoremove
else
debconf-apt-progress -- apt-get -y install build-essential
fi
;;
# Set the display resolution # Set the display resolution
# #
"Display" ) "Display" )
...@@ -703,13 +691,14 @@ function jobs () ...@@ -703,13 +691,14 @@ function jobs ()
# Enable or disable desktop # Enable or disable desktop
# #
"Desktop" ) "Desktop" )
if [[ -n $(service lightdm status 2> /dev/null | grep -w active | grep -w running) || -n $(service nodm status | grep -w active | grep -w running) ]]; then if [[ -n $DISPLAY_MANAGER ]]; then
dialog --title " Desktop is enabled and running " --backtitle "$BACKTITLE" \ dialog --title " Desktop is enabled and running " --backtitle "$BACKTITLE" \
--yes-label "Stop" --no-label "Cancel" --yesno "\nDo you want to stop and disable this service?" 7 50 --yes-label "Stop" --no-label "Cancel" --yesno "\nDo you want to stop and disable this service?" 7 50
exitstatus=$?; exitstatus=$?;
[[ $exitstatus = 0 ]] && service nodm stop && service lightdm stop && \ [[ $exitstatus = 0 ]] && service nodm stop >/dev/null 2>&1 && service lightdm stop >/dev/null 2>&1 && \
sed -i "s/^NODM_ENABLED=.*/NODM_ENABLED=false/" /etc/default/nodm sed -i "s/^NODM_ENABLED=.*/NODM_ENABLED=false/" /etc/default/nodm
else else
if [[ -n $DESKTOP_INSTALLED ]]; then
dialog --colors --title " Choose a display manager " --backtitle "$BACKTITLE" --help-button --help-label "Cancel" --yes-label "Lightdm" \ dialog --colors --title " Choose a display manager " --backtitle "$BACKTITLE" --help-button --help-label "Cancel" --yes-label "Lightdm" \
--no-label "Nodm" --yesno "\n\Z1Lightdm\Z0 = full featured login display manager\n\Z1Nodm\Z0 = autoloading into desktop" 8 70 --no-label "Nodm" --yesno "\n\Z1Lightdm\Z0 = full featured login display manager\n\Z1Nodm\Z0 = autoloading into desktop" 8 70
exitstatus=$?; exitstatus=$?;
...@@ -721,6 +710,10 @@ function jobs () ...@@ -721,6 +710,10 @@ function jobs ()
debconf-apt-progress -- apt-get -o Dpkg::Options::="--force-confold" -y --no-install-recommends install nodm \ debconf-apt-progress -- apt-get -o Dpkg::Options::="--force-confold" -y --no-install-recommends install nodm \
&& echo "/usr/sbin/nodm" > /etc/X11/default-display-manager && \ && echo "/usr/sbin/nodm" > /etc/X11/default-display-manager && \
sed -i "s/^NODM_ENABLED=.*/NODM_ENABLED=true/" /etc/default/nodm && service nodm start sed -i "s/^NODM_ENABLED=.*/NODM_ENABLED=true/" /etc/default/nodm && service nodm start
else
debconf-apt-progress -- apt-get update
debconf-apt-progress -- apt-get -y install armbian-desktop
fi
fi fi
;; ;;
...@@ -788,13 +781,6 @@ function jobs () ...@@ -788,13 +781,6 @@ function jobs ()
;; ;;
# Toggle running services
#
"Services" )
rcconf
;;
# Toggle overlay items # Toggle overlay items
# #
"Hardware" ) "Hardware" )
......
...@@ -611,6 +611,14 @@ while true; do ...@@ -611,6 +611,14 @@ while true; do
LIST=() LIST=()
# detect desktop
DISPLAY_MANAGER=""; DESKTOP_INSTALLED=""
check_if_installed nodm && DESKTOP_INSTALLED="nodm";
check_if_installed lightdm && DESKTOP_INSTALLED="lightdm";
[[ -n $(service lightdm status 2> /dev/null | grep -w active) ]] && DISPLAY_MANAGER="lightdm"
[[ -n $(service nodm status 2> /dev/null | grep -w active) ]] && DISPLAY_MANAGER="nodm"
local mark=$(apt-mark showhold | grep -w "$BOARD") local mark=$(apt-mark showhold | grep -w "$BOARD")
[[ $(sed -n 's/^DEVNAME=//p' /sys/dev/block/$(mountpoint -d /)/uevent 2> /dev/null) == mmcblk* && -f /usr/sbin/nand-sata-install ]] \ [[ $(sed -n 's/^DEVNAME=//p' /sys/dev/block/$(mountpoint -d /)/uevent 2> /dev/null) == mmcblk* && -f /usr/sbin/nand-sata-install ]] \
...@@ -648,12 +656,14 @@ while true; do ...@@ -648,12 +656,14 @@ while true; do
LIST+=( "Desktop" "Disable desktop" ) LIST+=( "Desktop" "Disable desktop" )
[[ $DISPLAY_MANAGER == 'nodm' ]] && LIST+=( "Lightdm" "Switch to standard login manager" ) [[ $DISPLAY_MANAGER == 'nodm' ]] && LIST+=( "Lightdm" "Switch to standard login manager" )
[[ $DISPLAY_MANAGER == 'lightdm' ]] && LIST+=( "Nodm" "Switch to simple auto login manager" ) [[ $DISPLAY_MANAGER == 'lightdm' ]] && LIST+=( "Nodm" "Switch to simple auto login manager" )
elif [[ -n $DESKTOP_INSTALLED ]]; then else
if [[ -n $DESKTOP_INSTALLED ]]; then
LIST+=( "Desktop" "Enable desktop" ) LIST+=( "Desktop" "Enable desktop" )
else
LIST+=( "Desktop" "Install desktop" )
fi
fi fi
LIST+=( "Services" "Toggle running services" )
if [[ "$DISTRO" == "Ubuntu" && "$(modinfo overlay > /dev/null 2>&1; echo $?)" == "0" ]]; then if [[ "$DISTRO" == "Ubuntu" && "$(modinfo overlay > /dev/null 2>&1; echo $?)" == "0" ]]; then
if [ -n "$(mount | grep -w tmpfs-root)" ]; then if [ -n "$(mount | grep -w tmpfs-root)" ]; then
LIST+=( "Overlayroot" "Disable virtual read-only root filesystem" ) LIST+=( "Overlayroot" "Disable virtual read-only root filesystem" )
...@@ -850,11 +860,6 @@ while true; do ...@@ -850,11 +860,6 @@ while true; do
if [[ -n $(dpkg -l | grep linux-headers) ]]; then LIST+=( "Headers" "Remove kernel headers" ); else \ if [[ -n $(dpkg -l | grep linux-headers) ]]; then LIST+=( "Headers" "Remove kernel headers" ); else \
LIST+=( "Headers" "Install kernel headers" ); fi LIST+=( "Headers" "Install kernel headers" ); fi
if check_if_installed build-essential then ; then
LIST+=( "Development" "Remove base development tools" );
else
LIST+=( "Development" "Install base development tools" );
fi
if [[ -n $DISPLAY_MANAGER ]]; then if [[ -n $DISPLAY_MANAGER ]]; then
if [[ $(service xrdp status 2> /dev/null | grep -w active) ]]; then if [[ $(service xrdp status 2> /dev/null | grep -w active) ]]; then
LIST+=( "RDP" "Disable remote desktop access from Windows" ) LIST+=( "RDP" "Disable remote desktop access from Windows" )
...@@ -899,12 +904,6 @@ BACKTITLE="Configuration utility, $ARMBIAN, https://www.armbian.com" ...@@ -899,12 +904,6 @@ BACKTITLE="Configuration utility, $ARMBIAN, https://www.armbian.com"
TITLE="$BOARD_NAME " TITLE="$BOARD_NAME "
DEFAULT_ADAPTER=$(ip -4 route ls | grep default | grep -Po '(?<=dev )(\S+)') DEFAULT_ADAPTER=$(ip -4 route ls | grep default | grep -Po '(?<=dev )(\S+)')
[[ -z "${DEFAULT_ADAPTER// }" ]] && DEFAULT_ADAPTER="lo" [[ -z "${DEFAULT_ADAPTER// }" ]] && DEFAULT_ADAPTER="lo"
# detect desktop
DISPLAY_MANAGER=""; DESKTOP_INSTALLED=""
check_if_installed bluetooth nodm && DESKTOP_INSTALLED="nodm";
check_if_installed bluetooth lightdm && DESKTOP_INSTALLED="lightdm";
[[ -n $(service lightdm status 2> /dev/null | grep -w active) ]] && DISPLAY_MANAGER="lightdm"
[[ -n $(service nodm status 2> /dev/null | grep -w active) ]] && DISPLAY_MANAGER="nodm"
OVERLAYDIR="/boot/dtb/overlay"; OVERLAYDIR="/boot/dtb/overlay";
[[ "$LINUXFAMILY" == "sunxi64" ]] && OVERLAYDIR="/boot/dtb/allwinner/overlay"; [[ "$LINUXFAMILY" == "sunxi64" ]] && OVERLAYDIR="/boot/dtb/allwinner/overlay";
dialog --backtitle "$BACKTITLE" --title "Please wait" --infobox "\nLoading Armbian configuration utility ... " 5 45 dialog --backtitle "$BACKTITLE" --title "Please wait" --infobox "\nLoading Armbian configuration utility ... " 5 45
......
...@@ -46,7 +46,7 @@ fi ...@@ -46,7 +46,7 @@ fi
# OMV # OMV
OMV_STATUS="$(check_if_installed openmediavault && echo "on" || echo "off" )" OMV_STATUS="$(check_if_installed openmediavault && echo "on" || echo "off" )"
[[ "$family" != "Ubuntu" ]] && LIST+=( "OMV" "OpenMediaVault NAS solution" "$OMV_STATUS" ) && LIST_CONST=3 [[ "$family" != "Ubuntu" ]] && LIST+=( "OMV" "OpenMediaVault NAS solution" "$OMV_STATUS" ) && LIST_CONST=5
# MINIdlna # MINIdlna
MINIDLNA_STATUS="$(check_if_installed minidlna && echo "on" || echo "off" )" MINIDLNA_STATUS="$(check_if_installed minidlna && echo "on" || echo "off" )"
LIST+=( "Minidlna" "Lightweight DLNA/UPnP-AV server" "$MINIDLNA_STATUS" ) LIST+=( "Minidlna" "Lightweight DLNA/UPnP-AV server" "$MINIDLNA_STATUS" )
...@@ -62,9 +62,6 @@ LIST+=( "UrBackup" "Open Source client/server backup system" "$URBACKUP_STATUS" ...@@ -62,9 +62,6 @@ LIST+=( "UrBackup" "Open Source client/server backup system" "$URBACKUP_STATUS"
# ISPconfig # ISPconfig
ISPCONFIG_STATUS="$([[ -d /usr/local/ispconfig ]] && echo "on" || echo "off" )" ISPCONFIG_STATUS="$([[ -d /usr/local/ispconfig ]] && echo "on" || echo "off" )"
LIST+=( "ISPConfig" "SMTP mail, IMAP, POP3 & LAMP/LEMP web server" "$ISPCONFIG_STATUS" ) LIST+=( "ISPConfig" "SMTP mail, IMAP, POP3 & LAMP/LEMP web server" "$ISPCONFIG_STATUS" )
# Webmin
WEBMIN_STATUS="$(check_if_installed webmin && echo "on" || echo "off" )"
LIST+=( "Webmin" "Web-based interface for system administration" "$WEBMIN_STATUS" )
} }
function choose_webserver function choose_webserver
...@@ -487,16 +484,6 @@ debconf-apt-progress -- apt-get -yy -f install ...@@ -487,16 +484,6 @@ debconf-apt-progress -- apt-get -yy -f install
} }
install_webmin (){
#------------------------------------------------------------------------------------------------------------------------------------------
# Webmin http://www.webmin.com
#------------------------------------------------------------------------------------------------------------------------------------------
wget -q http://www.webmin.com/download/deb/webmin-current.deb -O ${TEMP_DIR}/package.deb
dpkg -i ${TEMP_DIR}/package.deb
debconf-apt-progress -- apt-get -yy -f install
}
install_transmission (){ install_transmission (){
#------------------------------------------------------------------------------------------------------------------------------------------ #------------------------------------------------------------------------------------------------------------------------------------------
# transmission # transmission
...@@ -1234,11 +1221,6 @@ while true; do ...@@ -1234,11 +1221,6 @@ while true; do
check_port 51413 "UrBackup" check_port 51413 "UrBackup"
fi fi
if [[ "$selection" == *Webmin* && "$WEBMIN_STATUS" != "on" ]]; then
install_webmin
check_port 10000
fi
# reread statuses # reread statuses
check_status check_status
i=$[$i+1] i=$[$i+1]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment