Amanda; The designated storage area /storage/Backup you entered is not writeable for the Linux user backup

Hello Community,

I’am quite new to the Linux world and I hope you can help me to find my error.

I want to use Amanda on my Openhabian on Raspi4 with Openhab3.2.

Therefore ive added an external SDcard and set up the 53 Mirroring. There the SD card got set up and the sdb3 was mounted as /storage/ to the system. Into this Folder i wanted to create a Folder “Backup” where Amanda shall store its backups. But somehow the 52 -Amanda setup failed to access the folder:

Ive added the debug log below. Ive also checked the access rights manually at the end, but i could not find the mistake:

thanks in advance for any hints.
Best regards
Sebastian

openhabian@openhabian:~ $ sudo openhabian-config
2022-01-10_20:10:22_CET [openHABian] Checking for root privileges... OK
+ export UNATTENDED SILENT DEBUGMAX INTERACTIVE
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/auth.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/backup.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/config.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/ext-storage.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/find.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/habapp.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/helpers.bash
++ ESC='\033['
++ COL_DEF='\033[39;49;00m'
++ COL_RED='\033[31;01m'
++ COL_GREEN='\033[32;01m'
++ COL_YELLOW='\033[33;01m'
++ COL_BLUE='\033[34;01m'
++ COL_MAGENTA='\033[35;01m'
++ COL_CYAN='\033[36;01m'
++ COL_LGRAY='\033[37;01m'
++ COL_DGRAY='\033[90;01m'
++ export COL_DEF COL_RED COL_GREEN COL_YELLOW COL_BLUE COL_MAGENTA COL_CYAN COL_LGRAY COL_DGRAY
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/influxdb+grafana.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/java-jre.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/menu.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/nodejs-apps.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/openhab.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/openhabian.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/packages.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/system.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/vpn.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/wifi.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/zram.bash
++ pwd
+ OLDWD=/home/openhabian
+ cd /opt
+ update_openhabian_conf
+ local configFile=/etc/openhabian.conf
+ local referenceConfig=/opt/openhabian/build-image/openhabian.conf
+ cp /etc/openhabian.conf /etc/openhabian.conf.BAK
+ read -r line
+ [[ # Origin: openhabian.conf =~ ^(#)?[a-zA-Z] ]]
+ echo '# Origin: openhabian.conf'
+ read -r line
+ [[ # =~ ^(#)?[a-zA-Z] ]]
+ echo '#'
+ read -r line
+ [[ # Modify your openHABian settings =~ ^(#)?[a-zA-Z] ]]
+ echo '# Modify your openHABian settings'
+ read -r line
+ [[ # Handle with care, only touch if you need to! =~ ^(#)?[a-zA-Z] ]]
+ echo '# Handle with care, only touch if you need to!'
+ read -r line
+ [[ # This file will only be used on unattended initial install. =~ ^(#)?[a-zA-Z] ]]
+ echo '# This file will only be used on unattended initial install.'
+ read -r line
+ [[ # If you want to change anything after unattended install completed, use menu in openhabian-config. =~ ^(#)?[a-zA-Z] ]]
+ echo '# If you want to change anything after unattended install completed, use menu in openhabian-config.'
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # ATTENTION: to disable an option a line MUST be of the format '# option=value' =~ ^(#)?[a-zA-Z] ]]
+ echo '# ATTENTION: to disable an option a line MUST be of the format '\''# option=value'\'''
+ read -r line
+ [[ # KEEP THE SPACE IT IS IMPORTANT !! =~ ^(#)?[a-zA-Z] ]]
+ echo '# KEEP THE SPACE IT IS IMPORTANT !!'
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # Hostname to set this one to =~ ^(#)?[a-zA-Z] ]]
+ echo '# Hostname to set this one to'
+ read -r line
+ [[ hostname=openhabian =~ ^(#)?[a-zA-Z] ]]
+ parsed=hostname=openhabian
+ [[ hostname=openhabian =~ ^#[a-zA-Z] ]]
++ echo hostname=openhabian
++ cut -d= -f1
+ param=hostname
+ [[ -v hostname ]]
+ [[ openhabian == *\ * ]]
+ echo hostname=openhabian
+ read -r line
+ [[ # if it exists, the default user (with its working environment) will be renamed to this username given here ... =~ ^(#)?[a-zA-Z] ]]
+ echo '# if it exists, the default user (with its working environment) will be renamed to this username given here ...'
+ read -r line
+ [[ username=openhabian =~ ^(#)?[a-zA-Z] ]]
+ parsed=username=openhabian
+ [[ username=openhabian =~ ^#[a-zA-Z] ]]
++ echo username=openhabian
++ cut -d= -f1
+ param=username
+ [[ -v username ]]
+ [[ openhabian == *\ * ]]
+ echo username=openhabian
+ read -r line
+ [[ # ... and given this password. The password will be removed from this file after completion for security reasons. =~ ^(#)?[a-zA-Z] ]]
+ echo '# ... and given this password. The password will be removed from this file after completion for security reasons.'
+ read -r line
+ [[ userpw=openhabian =~ ^(#)?[a-zA-Z] ]]
+ parsed=userpw=openhabian
+ [[ userpw=openhabian =~ ^#[a-zA-Z] ]]
++ echo userpw=openhabian
++ cut -d= -f1
+ param=userpw
+ [[ -v userpw ]]
+ [[ openhabian == *\ * ]]
+ echo userpw=openhabian
+ read -r line
+ [[ # set this to download a SSH key and authorize the owner to login as the admin user =~ ^(#)?[a-zA-Z] ]]
+ echo '# set this to download a SSH key and authorize the owner to login as the admin user'
+ read -r line
+ [[ adminkeyurl="" =~ ^(#)?[a-zA-Z] ]]
+ parsed='adminkeyurl=""'
+ [[ adminkeyurl="" =~ ^#[a-zA-Z] ]]
++ echo 'adminkeyurl=""'
++ cut -d= -f1
+ param=adminkeyurl
+ [[ -v adminkeyurl ]]
+ [[ '' == *\ * ]]
+ echo adminkeyurl=
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # Language and timezone. See Debian documentation for valid values. =~ ^(#)?[a-zA-Z] ]]
+ echo '# Language and timezone. See Debian documentation for valid values.'
+ read -r line
+ [[ timezone=Europe/Berlin =~ ^(#)?[a-zA-Z] ]]
+ parsed=timezone=Europe/Berlin
+ [[ timezone=Europe/Berlin =~ ^#[a-zA-Z] ]]
++ echo timezone=Europe/Berlin
++ cut -d= -f1
+ param=timezone
+ [[ -v timezone ]]
+ [[ Europe/Berlin == *\ * ]]
+ echo timezone=Europe/Berlin
+ read -r line
+ [[ locales="en_US.UTF-8 de_DE.UTF-8" =~ ^(#)?[a-zA-Z] ]]
+ parsed='locales="en_US.UTF-8 de_DE.UTF-8"'
+ [[ locales="en_US.UTF-8 de_DE.UTF-8" =~ ^#[a-zA-Z] ]]
++ echo 'locales="en_US.UTF-8 de_DE.UTF-8"'
++ cut -d= -f1
+ param=locales
+ [[ -v locales ]]
+ [[ en_US.UTF-8 de_DE.UTF-8 == *\ * ]]
+ echo 'locales="en_US.UTF-8 de_DE.UTF-8"'
+ read -r line
+ [[ system_default_locale="en_US.UTF-8" =~ ^(#)?[a-zA-Z] ]]
+ parsed='system_default_locale="en_US.UTF-8"'
+ [[ system_default_locale="en_US.UTF-8" =~ ^#[a-zA-Z] ]]
++ echo 'system_default_locale="en_US.UTF-8"'
++ cut -d= -f1
+ param=system_default_locale
+ [[ -v system_default_locale ]]
+ [[ en_US.UTF-8 == *\ * ]]
+ echo system_default_locale=en_US.UTF-8
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # WiFi settings. An ethernet connection is recommended. =~ ^(#)?[a-zA-Z] ]]
+ echo '# WiFi settings. An ethernet connection is recommended.'
+ read -r line
+ [[ # If you have a RPi4, RPi3, RPi0W or a supported external WiFi dongle, the WiFi =~ ^(#)?[a-zA-Z] ]]
+ echo '# If you have a RPi4, RPi3, RPi0W or a supported external WiFi dongle, the WiFi'
+ read -r line
+ [[ # interface can be setup and used for the initial installation. =~ ^(#)?[a-zA-Z] ]]
+ echo '# interface can be setup and used for the initial installation.'
+ read -r line
+ [[ # Fill in your SSID and password below, leave empty or put comment in front to =~ ^(#)?[a-zA-Z] ]]
+ echo '# Fill in your SSID and password below, leave empty or put comment in front to'
+ read -r line
+ [[ # have your WiFi remain unchanged/uninitialized. Make sure your Ethernet works. =~ ^(#)?[a-zA-Z] ]]
+ echo '# have your WiFi remain unchanged/uninitialized. Make sure your Ethernet works.'
+ read -r line
+ [[ # ATTENTION: you need to escape these special characters: $, `, ", \, (newline) =~ ^(#)?[a-zA-Z] ]]
+ echo '# ATTENTION: you need to escape these special characters: $, `, ", \, (newline)'
+ read -r line
+ [[ # 'Escaping' means to put an additional \ in front of that character =~ ^(#)?[a-zA-Z] ]]
+ echo '# '\''Escaping'\'' means to put an additional \ in front of that character'
+ read -r line
+ [[ wifi_ssid="" =~ ^(#)?[a-zA-Z] ]]
+ parsed='wifi_ssid=""'
+ [[ wifi_ssid="" =~ ^#[a-zA-Z] ]]
++ echo 'wifi_ssid=""'
++ cut -d= -f1
+ param=wifi_ssid
+ [[ -v wifi_ssid ]]
+ [[ '' == *\ * ]]
+ echo wifi_ssid=
+ read -r line
+ [[ wifi_password="" =~ ^(#)?[a-zA-Z] ]]
+ parsed='wifi_password=""'
+ [[ wifi_password="" =~ ^#[a-zA-Z] ]]
++ echo 'wifi_password=""'
++ cut -d= -f1
+ param=wifi_password
+ [[ -v wifi_password ]]
+ [[ '' == *\ * ]]
+ echo wifi_password=
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # Wi-Fi setting. Select a two-letter country code suitable for your location =~ ^(#)?[a-zA-Z] ]]
+ echo '# Wi-Fi setting. Select a two-letter country code suitable for your location'
+ read -r line
+ [[ # E.g. US (default), DE, AU, NZ... =~ ^(#)?[a-zA-Z] ]]
+ echo '# E.g. US (default), DE, AU, NZ...'
+ read -r line
+ [[ # You may infringe on local legislature otherwise =~ ^(#)?[a-zA-Z] ]]
+ echo '# You may infringe on local legislature otherwise'
+ read -r line
+ [[ # See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 or /usr/share/zoneinfo/zone.tab =~ ^(#)?[a-zA-Z] ]]
+ echo '# See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 or /usr/share/zoneinfo/zone.tab'
+ read -r line
+ [[ wifi_country="" =~ ^(#)?[a-zA-Z] ]]
+ parsed='wifi_country=""'
+ [[ wifi_country="" =~ ^#[a-zA-Z] ]]
++ echo 'wifi_country=""'
++ cut -d= -f1
+ param=wifi_country
+ [[ -v wifi_country ]]
+ [[ '' == *\ * ]]
+ echo wifi_country=
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # Eventually disable all IPv6 e.g. on installation problems =~ ^(#)?[a-zA-Z] ]]
+ echo '# Eventually disable all IPv6 e.g. on installation problems'
+ read -r line
+ [[ # values: "enable", "disable" =~ ^(#)?[a-zA-Z] ]]
+ echo '# values: "enable", "disable"'
+ read -r line
+ [[ ipv6=enable =~ ^(#)?[a-zA-Z] ]]
+ parsed=ipv6=enable
+ [[ ipv6=enable =~ ^#[a-zA-Z] ]]
++ echo ipv6=enable
++ cut -d= -f1
+ param=ipv6
+ [[ -v ipv6 ]]
+ [[ enable == *\ * ]]
+ echo ipv6=enable
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # repo and branch to clone from =~ ^(#)?[a-zA-Z] ]]
+ echo '# repo and branch to clone from'
+ read -r line
+ [[ repositoryurl=https://github.com/openhab/openhabian.git =~ ^(#)?[a-zA-Z] ]]
+ parsed=repositoryurl=https://github.com/openhab/openhabian.git
+ [[ repositoryurl=https://github.com/openhab/openhabian.git =~ ^#[a-zA-Z] ]]
++ echo repositoryurl=https://github.com/openhab/openhabian.git
++ cut -d= -f1
+ param=repositoryurl
+ [[ -v repositoryurl ]]
+ [[ https://github.com/openhab/openhabian == *\ * ]]
+ echo repositoryurl=https://github.com/openhab/openhabian
+ read -r line
+ [[ clonebranch=openHAB3 =~ ^(#)?[a-zA-Z] ]]
+ parsed=clonebranch=openHAB3
+ [[ clonebranch=openHAB3 =~ ^#[a-zA-Z] ]]
++ echo clonebranch=openHAB3
++ cut -d= -f1
+ param=clonebranch
+ [[ -v clonebranch ]]
+ [[ main == *\ * ]]
+ echo clonebranch=main
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # initial openHAB configuration to import (URL or filename) =~ ^(#)?[a-zA-Z] ]]
+ echo '# initial openHAB configuration to import (URL or filename)'
+ read -r line
+ [[ # the file needs to be a zip archive created from openhab-cli backup =~ ^(#)?[a-zA-Z] ]]
+ echo '# the file needs to be a zip archive created from openhab-cli backup'
+ read -r line
+ [[ # initialconfig=/boot/initial.zip =~ ^(#)?[a-zA-Z] ]]
+ echo '# initialconfig=/boot/initial.zip'
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # debug verbosity mode =~ ^(#)?[a-zA-Z] ]]
+ echo '# debug verbosity mode'
+ read -r line
+ [[ # off, on (verbose output in log) or maximum (show every command) =~ ^(#)?[a-zA-Z] ]]
+ echo '# off, on (verbose output in log) or maximum (show every command)'
+ read -r line
+ [[ debugmode=off =~ ^(#)?[a-zA-Z] ]]
+ parsed=debugmode=off
+ [[ debugmode=off =~ ^#[a-zA-Z] ]]
++ echo debugmode=off
++ cut -d= -f1
+ param=debugmode
+ [[ -v debugmode ]]
+ [[ maximum == *\ * ]]
+ echo debugmode=maximum
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # the framebuffer on RPi is enabled by default =~ ^(#)?[a-zA-Z] ]]
+ echo '# the framebuffer on RPi is enabled by default'
+ read -r line
+ [[ framebuffer=enable =~ ^(#)?[a-zA-Z] ]]
+ parsed=framebuffer=enable
+ [[ framebuffer=enable =~ ^#[a-zA-Z] ]]
++ echo framebuffer=enable
++ cut -d= -f1
+ param=framebuffer
+ [[ -v framebuffer ]]
+ [[ enable == *\ * ]]
+ echo framebuffer=enable
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # fake hardware =~ ^(#)?[a-zA-Z] ]]
+ echo '# fake hardware'
+ read -r line
+ [[ # force treating your box as if it was a ... =~ ^(#)?[a-zA-Z] ]]
+ echo '# force treating your box as if it was a ...'
+ read -r line
+ [[ # pi4, pi4_8gb, cm4, pi400, pi3, cm3, pi3+, cm3+, pi2, pi1, cm1, pi0, pi0w, pi0w2, x86 =~ ^(#)?[a-zA-Z] ]]
+ echo '# pi4, pi4_8gb, cm4, pi400, pi3, cm3, pi3+, cm3+, pi2, pi1, cm1, pi0, pi0w, pi0w2, x86'
+ read -r line
+ [[ # hw= =~ ^(#)?[a-zA-Z] ]]
+ echo '# hw='
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # Hardware architecture =~ ^(#)?[a-zA-Z] ]]
+ echo '# Hardware architecture'
+ read -r line
+ [[ # x86_64, amd64, armv6l, armv7l, aarch64, arm64 =~ ^(#)?[a-zA-Z] ]]
+ echo '# x86_64, amd64, armv6l, armv7l, aarch64, arm64'
+ read -r line
+ [[ # hwarch= =~ ^(#)?[a-zA-Z] ]]
+ echo '# hwarch='
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # OS distribution/release =~ ^(#)?[a-zA-Z] ]]
+ echo '# OS distribution/release'
+ read -r line
+ [[ # Valid arguments: raspios, raspbian, debian, ubuntu, stretch, buster, bullseye, bionic, focal =~ ^(#)?[a-zA-Z] ]]
+ echo '# Valid arguments: raspios, raspbian, debian, ubuntu, stretch, buster, bullseye, bionic, focal'
+ read -r line
+ [[ # osrelease= =~ ^(#)?[a-zA-Z] ]]
+ echo '# osrelease='
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # Java version to install =~ ^(#)?[a-zA-Z] ]]
+ echo '# Java version to install'
+ read -r line
+ [[ java_opt=11 =~ ^(#)?[a-zA-Z] ]]
+ parsed=java_opt=11
+ [[ java_opt=11 =~ ^#[a-zA-Z] ]]
++ echo java_opt=11
++ cut -d= -f1
+ param=java_opt
+ [[ -v java_opt ]]
+ [[ Zulu11-32 == *\ * ]]
+ echo java_opt=Zulu11-32
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # install zram per default, set to "disable" to skip installation =~ ^(#)?[a-zA-Z] ]]
+ echo '# install zram per default, set to "disable" to skip installation'
+ read -r line
+ [[ zraminstall=enable =~ ^(#)?[a-zA-Z] ]]
+ parsed=zraminstall=enable
+ [[ zraminstall=enable =~ ^#[a-zA-Z] ]]
++ echo zraminstall=enable
++ cut -d= -f1
+ param=zraminstall
+ [[ -v zraminstall ]]
+ [[ enable == *\ * ]]
+ echo zraminstall=enable
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # start comitup hotspot if internet is not reachable =~ ^(#)?[a-zA-Z] ]]
+ echo '# start comitup hotspot if internet is not reachable'
+ read -r line
+ [[ hotspot=enable =~ ^(#)?[a-zA-Z] ]]
+ parsed=hotspot=enable
+ [[ hotspot=enable =~ ^#[a-zA-Z] ]]
++ echo hotspot=enable
++ cut -d= -f1
+ param=hotspot
+ [[ -v hotspot ]]
+ [[ enable == *\ * ]]
+ echo hotspot=enable
+ read -r line
+ [[ hotspotpw=openhabian =~ ^(#)?[a-zA-Z] ]]
+ parsed=hotspotpw=openhabian
+ [[ hotspotpw=openhabian =~ ^#[a-zA-Z] ]]
++ echo hotspotpw=openhabian
++ cut -d= -f1
+ param=hotspotpw
+ [[ -v hotspotpw ]]
+ [[ openhabian == *\ * ]]
+ echo hotspotpw=openhabian
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # external SD card device to backup and mirror the internal SD card to =~ ^(#)?[a-zA-Z] ]]
+ echo '# external SD card device to backup and mirror the internal SD card to'
+ read -r line
+ [[ # backupdrive=/dev/sda =~ ^(#)?[a-zA-Z] ]]
+ echo '# backupdrive=/dev/sda'
+ read -r line
+ [[ storageconfig=openhab-dir =~ ^(#)?[a-zA-Z] ]]
+ parsed=storageconfig=openhab-dir
+ [[ storageconfig=openhab-dir =~ ^#[a-zA-Z] ]]
++ echo storageconfig=openhab-dir
++ cut -d= -f1
+ param=storageconfig
+ [[ -v storageconfig ]]
+ [[ openhab-dir == *\ * ]]
+ echo storageconfig=openhab-dir
+ read -r line
+ [[ storagedir=/storage =~ ^(#)?[a-zA-Z] ]]
+ parsed=storagedir=/storage
+ [[ storagedir=/storage =~ ^#[a-zA-Z] ]]
++ echo storagedir=/storage
++ cut -d= -f1
+ param=storagedir
+ [[ -v storagedir ]]
+ [[ /storage == *\ * ]]
+ echo storagedir=/storage
+ read -r line
+ [[ storagetapes=15 =~ ^(#)?[a-zA-Z] ]]
+ parsed=storagetapes=15
+ [[ storagetapes=15 =~ ^#[a-zA-Z] ]]
++ echo storagetapes=15
++ cut -d= -f1
+ param=storagetapes
+ [[ -v storagetapes ]]
+ [[ 15 == *\ * ]]
+ echo storagetapes=15
+ read -r line
+ [[ storagecapacity=1024 =~ ^(#)?[a-zA-Z] ]]
+ parsed=storagecapacity=1024
+ [[ storagecapacity=1024 =~ ^#[a-zA-Z] ]]
++ echo storagecapacity=1024
++ cut -d= -f1
+ param=storagecapacity
+ [[ -v storagecapacity ]]
+ [[ 1024 == *\ * ]]
+ echo storagecapacity=1024
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # mail relay settings =~ ^(#)?[a-zA-Z] ]]
+ echo '# mail relay settings'
+ read -r line
+ [[ # adminmail=john.doe@foo.bar =~ ^(#)?[a-zA-Z] ]]
+ echo '# adminmail=john.doe@foo.bar'
+ read -r line
+ [[ # relayuser=john.doe@foo.bar =~ ^(#)?[a-zA-Z] ]]
+ echo '# relayuser=john.doe@foo.bar'
+ read -r line
+ [[ # relaypass=secret =~ ^(#)?[a-zA-Z] ]]
+ echo '# relaypass=secret'
+ read -r line
+ [[ # smarthost=smtp.gmail.com =~ ^(#)?[a-zA-Z] ]]
+ echo '# smarthost=smtp.gmail.com'
+ read -r line
+ [[ # smartport=587 =~ ^(#)?[a-zA-Z] ]]
+ echo '# smartport=587'
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # Tailscale VPN =~ ^(#)?[a-zA-Z] ]]
+ echo '# Tailscale VPN'
+ read -r line
+ [[ # preauthkey=tskey-xxxxxxxxxxxxxxxxx =~ ^(#)?[a-zA-Z] ]]
+ echo '# preauthkey=tskey-xxxxxxxxxxxxxxxxx'
+ read -r line
+ [[ # tstags=tag:client =~ ^(#)?[a-zA-Z] ]]
+ echo '# tstags=tag:client'
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # Custom log files =~ ^(#)?[a-zA-Z] ]]
+ echo '# Custom log files'
+ read -r line
+ [[ # custom_log_files=("/var/log/foo.log" "/var/log/bar.log") =~ ^(#)?[a-zA-Z] ]]
+ echo '# custom_log_files=("/var/log/foo.log" "/var/log/bar.log")'
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # vim: filetype=sh =~ ^(#)?[a-zA-Z] ]]
+ echo '# vim: filetype=sh'
+ read -r line
+ set_cpu_speed
+ is_raspios
+ [[ '' == \r\a\s\p\i\o\s ]]
+ is_raspbian
+ [[ '' == \r\a\s\p\b\i\a\n ]]
++ cat /etc/os-release
+ [[ PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs" =~ Raspbian ]]
+ return 0
+ return 0
+ running_in_docker
+ [[ -n '' ]]
+ grep -qs 'docker\|lxc' /proc/1/cgroup
+ [[ -f /.dockerenv ]]
+ return 1
+ echo 'GOVERNOR="ondemand"'
+ echo ondemand
+ config_ipv6
+ local aptConf=/etc/apt/apt.conf.d/S90force-ipv4
+ local sysctlConf=/etc/sysctl.d/99-sysctl.conf
+ [[ enable == \d\i\s\a\b\l\e ]]
+ [[ enable == \e\n\a\b\l\e ]]
+ grep -qs '^[[:space:]]*# Disable all IPv6 functionality' /etc/sysctl.d/99-sysctl.conf
+ [[ -n '' ]]
+ apt_update
+ PID_APT=16756
+ apt-get update
+ whiptail_check
++ command -v whiptail
+ [[ -x /usr/bin/whiptail ]]
+ load_create_config
+ local 'questionText=\nWelcome to openHABian!\n\nPlease provide the name of your Linux user i.e. the account you normally log in with.\n\nTypical user names are '\''pi'\'' or '\''ubuntu'\''.'
+ local input
+ [[ -f /etc/openhabian.conf ]]
++ timestamp
++ date +%F_%T_%Z
+ echo -n '2022-01-10_20:10:22_CET [openHABian] Loading configuration file '\''/etc/openhabian.conf'\''... '
2022-01-10_20:10:22_CET [openHABian] Loading configuration file '/etc/openhabian.conf'... ++ getent group openhabian
+ [[ ! -n openhabian:x:1000:openhabian,frontail ]]
+ id -u openhabian
+ source /etc/openhabian.conf
++ hostname=openhabian
++ username=openhabian
++ userpw=openhabian
++ adminkeyurl=
++ timezone=Europe/Berlin
++ locales='en_US.UTF-8 de_DE.UTF-8'
++ system_default_locale=en_US.UTF-8
++ wifi_ssid=
++ wifi_password=
++ wifi_country=
++ ipv6=enable
++ repositoryurl=https://github.com/openhab/openhabian
++ clonebranch=main
++ debugmode=maximum
++ framebuffer=enable
++ java_opt=Zulu11-32
++ zraminstall=enable
++ hotspot=enable
++ hotspotpw=openhabian
++ storageconfig=openhab-dir
++ storagedir=/storage
++ storagetapes=15
++ storagecapacity=1024
+ echo OK
OK
+ openhabian_console_check
+ [[ -z 1 ]]
++ tput cols
+ [[ 207 -ge 120 ]]
+ return 0
+ openhabian_update_check
+ [[ -z 1 ]]
+ local branch
+ local introText
+ local unsupportedOSText
+ branch=main
+ introText='Additions, improvements or fixes were added to the openHABian configuration tool. Would you like to update now and benefit from them? The update will not automatically apply changes to your system.\n\nUpdating is recommended.'
+ unsupportedOSText='You are running an old Linux release that is no longer officially supported.\nWe recommend upgrading to the most current stable release of your distribution (or current Long Term Support version for distributions that offer LTS).\nDo you really want to continue using openHABian on this system?'
++ timestamp
++ date +%F_%T_%Z
++ get_git_revision
++ local branch
++ local commitDate
++ local shorthash
+++ git -C /opt/openhabian rev-parse --abbrev-ref HEAD
++ branch=main
+++ git -C /opt/openhabian log --pretty=format:%aI -n 1
++ commitDate=2022-01-07T22:33:59+01:00
+++ git -C /opt/openhabian log --pretty=format:%h -n 1
++ shorthash=9c28990
++ echo '[main]{2022-01-07T22:33:59+01:00}(9c28990)'
+ echo '2022-01-10_20:10:22_CET [openHABian] openHABian configuration tool version: [main]{2022-01-07T22:33:59+01:00}(9c28990)'
2022-01-10_20:10:22_CET [openHABian] openHABian configuration tool version: [main]{2022-01-07T22:33:59+01:00}(9c28990)
++ timestamp
++ date +%F_%T_%Z
+ echo -n '2022-01-10_20:10:22_CET [openHABian] Checking for changes in origin branch main... '
2022-01-10_20:10:22_CET [openHABian] Checking for changes in origin branch main... + is_stretch
+ [[ '' == \s\t\r\e\t\c\h ]]
++ cat /etc/os-release
+ [[ PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs" =~ stretch ]]
+ return 1
+ is_xenial
+ [[ '' == \x\e\n\i\a\l ]]
++ cat /etc/os-release
+ [[ PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs" =~ xenial ]]
+ return 1
+ git -C /opt/openhabian config user.email openhabian@openHABian
+ git -C /opt/openhabian config user.name openhabian
+ git -C /opt/openhabian fetch --quiet origin
++ git -C /opt/openhabian rev-parse main
++ git -C /opt/openhabian rev-parse '@{u}'
+ [[ 9c28990bb17551ae70d0b00c6e6fd9625fcff88b == 9c28990bb17551ae70d0b00c6e6fd9625fcff88b ]]
+ echo OK
OK
+ openhabian_announcements
+ [[ -z 1 ]]
+ local altReadNews
+ local newsFile
+ local readNews
+ altReadNews=/tmp/NEWS.md
+ newsFile=/opt/openhabian/NEWS.md
+ readNews=/opt/openhabian/docs/NEWS.md
+ cmp --silent /opt/openhabian/NEWS.md /opt/openhabian/docs/NEWS.md
++ timestamp
++ date +%F_%T_%Z
+ echo -n '2022-01-10_20:10:23_CET [openHABian] Switching to branch main... '
2022-01-10_20:10:23_CET [openHABian] Switching to branch main... + git -C /opt/openhabian checkout --quiet main
+ echo OK
OK
+ bashrc_copy
++ timestamp
++ date +%F_%T_%Z
+ echo -n '2022-01-10_20:10:23_CET [openHABian] Adding slightly tuned bash configuration files to system... '
2022-01-10_20:10:23_CET [openHABian] Adding slightly tuned bash configuration files to system... + cp /opt/openhabian/includes/generic/bash.bashrc /etc/bash.bashrc
+ cp /opt/openhabian/includes/generic/bashrc-root /root/.bashrc
+ cp /opt/openhabian/includes/generic/bash_profile /home/openhabian/.bash_profile
+ cp /opt/openhabian/includes/generic/bash_aliases /home/openhabian/.bash_aliases
+ chown openhabian:openhabian /home/openhabian/.bash_aliases /home/openhabian/.bash_history /home/openhabian/.bash_logout /home/openhabian/.bash_profile
+ echo OK
OK
+ show_main_menu
+ local choice
+ local version
+++ get_git_revision
+++ local branch
+++ local commitDate
+++ local shorthash
++++ git -C /opt/openhabian rev-parse --abbrev-ref HEAD
+++ branch=main
++++ git -C /opt/openhabian log --pretty=format:%aI -n 1
+++ commitDate=2022-01-07T22:33:59+01:00
++++ git -C /opt/openhabian log --pretty=format:%h -n 1
+++ shorthash=9c28990
+++ echo '[main]{2022-01-07T22:33:59+01:00}(9c28990)'
++ whiptail --title 'openHABian Configuration Tool — [main]{2022-01-07T22:33:59+01:00}(9c28990)' --menu 'Setup Options' 19 116 12 --cancel-button Exit --ok-button Execute '00 | About openHABian' 'Information about the openHABian project and this tool' '' '' '01 | Select Branch' 'Select the openHABian config tool version ("branch") to run' '02 | Upgrade System' 'Update all installed software packages (incl. openHAB) to their latest version' '03 | Install openHAB' 'Install or upgrade to openHAB 3' '04 | Import config' 'Import an openHAB 3 configuration from file or URL' '' '' '10 | Apply Improvements' 'Apply the latest improvements to the basic openHABian setup ►' '20 | Optional Components' 'Choose from a set of optional software components ►' '30 | System Settings' 'A range of system and hardware related configuration steps ►' '40 | openHAB Related' 'Switch the installed openHAB version or apply tweaks ►' '50 | Backup/Restore' 'Manage backups and restore your system ►'
+ choice='50 | Backup/Restore'
+ RET=0
+ '[' 0 -eq 1 ']'
+ '[' 0 -eq 255 ']'
+ [[ 50 | Backup/Restore == '' ]]
+ [[ 50 | Backup/Restore == \0\0* ]]
+ [[ 50 | Backup/Restore == \0\1* ]]
+ [[ 50 | Backup/Restore == \0\2* ]]
+ [[ 50 | Backup/Restore == \0\3* ]]
+ [[ 50 | Backup/Restore == \0\4* ]]
+ [[ 50 | Backup/Restore == \1\0* ]]
+ [[ 50 | Backup/Restore == \2\0* ]]
+ [[ 50 | Backup/Restore == \3\0* ]]
+ [[ 50 | Backup/Restore == \4\0* ]]
+ [[ 50 | Backup/Restore == \5\0* ]]
+++ get_git_revision
+++ local branch
+++ local commitDate
+++ local shorthash
++++ git -C /opt/openhabian rev-parse --abbrev-ref HEAD
+++ branch=main
++++ git -C /opt/openhabian log --pretty=format:%aI -n 1
+++ commitDate=2022-01-07T22:33:59+01:00
++++ git -C /opt/openhabian log --pretty=format:%h -n 1
+++ shorthash=9c28990
+++ echo '[main]{2022-01-07T22:33:59+01:00}(9c28990)'
++ whiptail --title 'openHABian Configuration Tool — [main]{2022-01-07T22:33:59+01:00}(9c28990)' --menu Backup/Restore 15 116 8 --cancel-button Back --ok-button Execute '50 | Backup openHAB config' 'Backup the current active openHAB configuration' '51 | Restore an openHAB config' 'Restore an openHAB configuration from backup zipfile' '   | Restore text only config' 'Restore text only configuration without restarting' '52 | Amanda System Backup' 'Set up Amanda to comprehensively backup your complete openHABian box' '53 | Setup SD mirroring' 'Setup mirroring of internal to external SD card' '   | Remove SD mirroring' 'Disable mirroring of SD cards' '54 | Raw copy SD' 'Raw copy internal SD to external disk / SD card' '55 | Sync SD' 'Rsync internal SD to external disk / SD card'
+ choice2='52 | Amanda System Backup'
+ '[' 0 -eq 1 ']'
+ '[' 1 -eq 255 ']'
+ case "$choice2" in
+ wait_for_apt_to_finish_update
++ timestamp
++ date +%F_%T_%Z
+ echo -n '2022-01-10_20:10:30_CET [openHABian] Updating Linux package information... '
2022-01-10_20:10:30_CET [openHABian] Updating Linux package information... + [[ -z 16756 ]]
+ tail --pid=16756 -f /dev/null
+ echo OK
OK
+ amanda_setup
+ [[ -z 1 ]]
+ local config
+ local backupUser=backup
+ local tapes
+ local tapeSize
+ local storageLoc
+ local adminMail=root@openhabian
+ local awsSite
+ local awsBucket
+ local awsAccessKey
+ local awsSecretKey
+ local backupPass
+ local backupPass1
+ local backupPass2
+ local 'queryText=You are about to install the Amanda backup solution.\nDocumentation is available at '\''/opt/openhabian/docs/openhabian-amanda.md'\'' or https://github.com/openhab/openhabian/blob/main/docs/openhabian-amanda.md\nHave you read this document? If not, please do so now, as you will need to follow the instructions provided there in order to successfully complete installation of Amanda.\n\nProceeding will setup a backup mechanism to allow for saving your openHAB setup and modifications to either USB attached or Amazon cloud storage.\nYou can add your own files/directories to be backed up, and you can store and create clones of your openHABian SD card to have an pre-prepared replacement in case of card failures.\n\nWARNING: running this setup will overwrite any previous Amanda backup configurations.\n\nWould you like to begin setup?'
+ local 'successText=Setup was successful.\n\nAmanda backup tool is now taking backups around 01:00. For further readings, start at http://wiki.zmanda.com/index.php/User_documentation.'
++ timestamp
++ date +%F_%T_%Z
+ echo -n '2022-01-10_20:10:30_CET [openHABian] Beginning setup of the Amanda backup system... '
2022-01-10_20:10:30_CET [openHABian] Beginning setup of the Amanda backup system... + whiptail --title 'Amanda backup installation' --yes-button Continue --no-button Cancel --defaultno --yesno 'You are about to install the Amanda backup solution.\nDocumentation is available at '\''/opt/openhabian/docs/openhabian-amanda.md'\'' or https://github.com/openhab/openhabian/blob/main/docs/openhabian-amanda.md\nHave you read this document? If not, please do so now, as you will need to follow the instructions provided there in order to successfully complete installation of Amanda.\n\nProceeding will setup a backup mechanism to allow for saving your openHAB setup and modifications to either USB attached or Amazon cloud storage.\nYou can add your own files/directories to be backed up, and you can store and create clones of your openHABian SD card to have an pre-prepared replacement in case of card failures.\n\nWARNING: running this setup will overwrite any previous Amanda backup configurations.\n\nWould you like to begin setup?' 24 80
+ echo OK
OK
+ [[ -z '' ]]
++ whiptail --title 'Authentication setup' --passwordbox '\nEnter a password for backup:' 9 80
+ backupPass1=openhabian
++ whiptail --title 'Authentication setup' --passwordbox '\nPlease confirm the password:' 9 80
+ backupPass2=openhabian
+ [[ openhabian == \o\p\e\n\h\a\b\i\a\n ]]
+ [[ 10 -ge 8 ]]
+ [[ 10 -ge 8 ]]
+ backupPass=openhabian
+ [[ -z openhabian ]]
+ amanda_install openhabian
+ local backupUser=backup
+ local backupPass=openhabian
++ timestamp
++ date +%F_%T_%Z
+ echo -n '2022-01-10_20:10:39_CET [openHABian] Configuring Amanda backup system prerequisites... '
2022-01-10_20:10:39_CET [openHABian] Configuring Amanda backup system prerequisites... + echo backup:openhabian
+ cond_redirect chpasswd
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chpasswd \033[39;49;00m'

$ chpasswd
+ chpasswd
+ return 0
+ grep -qs '^[[:space:]]*backup:' /etc/group
+ cond_redirect usermod --append --groups backup openhabian
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ usermod --append --groups backup openhabian \033[39;49;00m'

$ usermod --append --groups backup openhabian
+ usermod --append --groups backup openhabian
+ return 0
+ cond_redirect usermod --append --groups backup backup
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ usermod --append --groups backup backup \033[39;49;00m'

$ usermod --append --groups backup backup
+ usermod --append --groups backup backup
+ return 0
+ cond_redirect chsh --shell /bin/bash backup
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chsh --shell /bin/bash backup \033[39;49;00m'

$ chsh --shell /bin/bash backup
+ chsh --shell /bin/bash backup
+ return 0
+ echo OK
OK
+ amanda_is_installed
+ dpkg -s amanda-common amanda-server amanda-client
+ return 0
+ dpkg -s exim4
++ whiptail --title 'Reporting address' --inputbox '\nEnter a mail address to have Amanda send reports to:' 9 80 root@openhabian
+ adminMail=raspi@sosh-home.de
+ whiptail --title 'Backup using locally attached storage' --yes-button Yes --no-button No --yesno 'Would you like to setup a backup mechanism based on locally attached or NAS mounted storage?' 8 80
+ config=openhab-dir
++ whiptail --title 'Storage directory' --inputbox '\nWhat is the directory backups should be stored in?\n\nYou can specify any locally accessible directory, no matter if it'\''s located on the internal SD card, an external USB-attached device such as a USB stick, HDD, or a NFS/CIFS share.' 13 80
+ storageLoc=/storage/Backup
+ cond_redirect sudo -u backup 'touch /storage/Backup/TEST'
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ sudo -u backup touch /storage/Backup/TEST \033[39;49;00m'

$ sudo -u backup touch /storage/Backup/TEST
+ sudo -u backup 'touch /storage/Backup/TEST'
sudo: touch /storage/Backup/TEST: command not found
+ return 1
+ echo 'FAILED (storage write access for user backup)'
FAILED (storage write access for user backup)
+ whiptail --title 'Amanda storage setup failed' --msgbox 'Amanda storage setup failed.\n\nThe designated storage area /storage/Backup you entered is not writeable for the Linux user backup.\nPlease ensure it is. If it is located on a NAS or NFS server, search the Amanda docs for the term no_root_squash.' 10 80
+ return 1
+ '[' 1 -ne 0 ']'
+ whiptail --msgbox 'There was an error or interruption during the execution of:\n  "50 | Backup/Restore"\n\nPlease try again. If the error persists, please read /opt/openhabian/docs/openhabian-DEBUG.md or https://github.com/openhab/openhabian/blob/main/docs/openhabian-DEBUG.md how to proceed.' 14 80
+ return 0
+ true
+ show_main_menu
+ local choice
+ local version
+++ get_git_revision
+++ local branch
+++ local commitDate
+++ local shorthash
++++ git -C /opt/openhabian rev-parse --abbrev-ref HEAD
+++ branch=main
++++ git -C /opt/openhabian log --pretty=format:%aI -n 1
+++ commitDate=2022-01-07T22:33:59+01:00
++++ git -C /opt/openhabian log --pretty=format:%h -n 1
+++ shorthash=9c28990
+++ echo '[main]{2022-01-07T22:33:59+01:00}(9c28990)'
++ whiptail --title 'openHABian Configuration Tool — [main]{2022-01-07T22:33:59+01:00}(9c28990)' --menu 'Setup Options' 19 116 12 --cancel-button Exit --ok-button Execute '00 | About openHABian' 'Information about the openHABian project and this tool' '' '' '01 | Select Branch' 'Select the openHABian config tool version ("branch") to run' '02 | Upgrade System' 'Update all installed software packages (incl. openHAB) to their latest version' '03 | Install openHAB' 'Install or upgrade to openHAB 3' '04 | Import config' 'Import an openHAB 3 configuration from file or URL' '' '' '10 | Apply Improvements' 'Apply the latest improvements to the basic openHABian setup ►' '20 | Optional Components' 'Choose from a set of optional software components ►' '30 | System Settings' 'A range of system and hardware related configuration steps ►' '40 | openHAB Related' 'Switch the installed openHAB version or apply tweaks ►' '50 | Backup/Restore' 'Manage backups and restore your system ►'
+ choice=
+ RET=255
+ '[' 255 -eq 1 ']'
+ '[' 255 -eq 255 ']'
+ return 255
+ system_check_default_password
+ is_pi
+ is_pifour
+ [[ '' == \p\i\4 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]11[0-9a-fA-F]$' /proc/cpuinfo
+ return 0
+ return 0
+ local algo
+ local defaultPassword
+ local defaultUser
+ local generatedPassword
+ local introText
+ local originalPassword
+ local salt
+ is_pi
+ is_pifour
+ [[ '' == \p\i\4 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]11[0-9a-fA-F]$' /proc/cpuinfo
+ return 0
+ return 0
+ id -u pi
+ is_pi
+ is_pifour
+ [[ '' == \p\i\4 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]11[0-9a-fA-F]$' /proc/cpuinfo
+ return 0
+ return 0
+ defaultUser=openhabian
+ defaultPassword=openhabian
++ grep -w openhabian /etc/shadow
++ cut -d: -f2
+ originalPassword='$6$uwARqIrZsn9twldU$kR4rsOp4bgOc/GbhZdsQqrLrRuspgbfL19WLgqW0LgRb4d/gFeGQaLytwqv5rxcm8G3SxAno8oWEFDuXpI4Ms0'
++ echo '$6$uwARqIrZsn9twldU$kR4rsOp4bgOc/GbhZdsQqrLrRuspgbfL19WLgqW0LgRb4d/gFeGQaLytwqv5rxcm8G3SxAno8oWEFDuXpI4Ms0'
++ cut '-d$' -f2
+ algo=6
+ introText='The default password was detected on your system! That is a serious security concern. Bad guys or malicious programs in your subnet are able to gain root access!\n\nPlease set a strong password by typing the command '\''passwd openhabian'\''!'
++ echo '$6$uwARqIrZsn9twldU$kR4rsOp4bgOc/GbhZdsQqrLrRuspgbfL19WLgqW0LgRb4d/gFeGQaLytwqv5rxcm8G3SxAno8oWEFDuXpI4Ms0'
++ cut '-d$' -f3
+ salt=uwARqIrZsn9twldU
+ export algo defaultPassword salt
++ perl -le 'print crypt("$ENV{defaultPassword}","\$$ENV{algo}\$$ENV{salt}\$")'
+ generatedPassword='$6$uwARqIrZsn9twldU$kR4rsOp4bgOc/GbhZdsQqrLrRuspgbfL19WLgqW0LgRb4d/gFeGQaLytwqv5rxcm8G3SxAno8oWEFDuXpI4Ms0'
++ timestamp
++ date +%F_%T_%Z
+ echo -n '2022-01-10_20:11:10_CET [openHABian] Checking for default openHABian username:password combination... '
2022-01-10_20:11:10_CET [openHABian] Checking for default openHABian username:password combination... ++ id -u openhabian
+ [[ -n 1000 ]]
+ [[ $6$uwARqIrZsn9twldU$kR4rsOp4bgOc/GbhZdsQqrLrRuspgbfL19WLgqW0LgRb4d/gFeGQaLytwqv5rxcm8G3SxAno8oWEFDuXpI4Ms0 == \$\6\$\u\w\A\R\q\I\r\Z\s\n\9\t\w\l\d\U\$\k\R\4\r\s\O\p\4\b\g\O\c\/\G\b\h\Z\d\s\Q\q\r\L\r\R\u\s\p\g\b\f\L\1\9\W\L\g\q\W\0\L\g\R\b\4\d\/\g\F\e\G\Q\a\L\y\t\w\q\v\5\r\x\c\m\8\G\3\S\x\A\n\o\8\o\W\E\F\D\u\X\p\I\4\M\s\0 ]]
+ [[ -n 1 ]]
+ whiptail --title 'Default password detected' --msgbox 'The default password was detected on your system! That is a serious security concern. Bad guys or malicious programs in your subnet are able to gain root access!\n\nPlease set a strong password by typing the command '\''passwd openhabian'\''!' 11 80
+ echo FAILED
FAILED
++ timestamp
++ date +%F_%T_%Z
+ echo -e '2022-01-10_20:11:11_CET [openHABian] We hope you got what you came for! See you again soon ;)'
2022-01-10_20:11:11_CET [openHABian] We hope you got what you came for! See you again soon ;)
+ cd /home/openhabian
openhabian@openhabian:~ $ su backup
Password:
[20:12:50] backup@openhabian:/home/openhabian$ touch /storage/Backup/Test
[20:13:27] backup@openhabian:/home/openhabian$ su openhabian
Password:
openhabian@openhabian:~ $ sudo -u backup touch /storage/Backup/Test
openhabian@openhabian:~ $ ls /storage/Backup/
Test
openhabian@openhabian:~ $ ls -l  /storage/Backup/
total 0
-rw-r--r-- 1 backup backup 0 Jan 10 20:15 Test
openhabian@openhabian:~ $


I think that is a problem in openhabian.
The command ( ‘touch /storage/Backup/TEST’ ) is quoted together with it’s arguments.
This makes it one command with spaces not a command with arguments.
As this argument does not exist the command returns “command not found”.
The error message then is interpreted to be “FAILED ( storage write access for user backup )” which is wrong interpretation of the error.

update openhabian on start and try again

Thank you! I’ve updated and now i’am a step further :smiley:
Best regards
Sebastian

unfortunatly at the next step a simular error occured:
when i’am asked for the size to use the assisten aborts:

openHABian configuration tool successfully updated.
+ [[ -n 1 ]]
+ echo 'Visit the development repository for more details: https://github.com/openhab/openhabian'
Visit the development repository for more details: https://github.com/openhab/openhabian
+ echo 'The tool will now restart to load the updates... OK'
The tool will now restart to load the updates... OK
+ exec /opt/openhabian/openhabian-setup.sh
2022-01-11_20:58:09_CET [openHABian] Checking for root privileges... OK
+ export UNATTENDED SILENT DEBUGMAX INTERACTIVE
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/auth.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/backup.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/config.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/ext-storage.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/find.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/habapp.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/helpers.bash
++ ESC='\033['
++ COL_DEF='\033[39;49;00m'
++ COL_RED='\033[31;01m'
++ COL_GREEN='\033[32;01m'
++ COL_YELLOW='\033[33;01m'
++ COL_BLUE='\033[34;01m'
++ COL_MAGENTA='\033[35;01m'
++ COL_CYAN='\033[36;01m'
++ COL_LGRAY='\033[37;01m'
++ COL_DGRAY='\033[90;01m'
++ export COL_DEF COL_RED COL_GREEN COL_YELLOW COL_BLUE COL_MAGENTA COL_CYAN COL_LGRAY COL_DGRAY
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/influxdb+grafana.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/java-jre.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/menu.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/nodejs-apps.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/openhab.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/openhabian.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/packages.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/system.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/vpn.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/wifi.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/zram.bash
++ pwd
+ OLDWD=/opt
+ cd /opt
+ update_openhabian_conf
+ local configFile=/etc/openhabian.conf
+ local referenceConfig=/opt/openhabian/build-image/openhabian.conf
+ cp /etc/openhabian.conf /etc/openhabian.conf.BAK
+ read -r line
+ [[ # Origin: openhabian.conf =~ ^(#)?[a-zA-Z] ]]
+ echo '# Origin: openhabian.conf'
+ read -r line
+ [[ # =~ ^(#)?[a-zA-Z] ]]
+ echo '#'
+ read -r line
+ [[ # Modify your openHABian settings =~ ^(#)?[a-zA-Z] ]]
+ echo '# Modify your openHABian settings'
+ read -r line
+ [[ # Handle with care, only touch if you need to! =~ ^(#)?[a-zA-Z] ]]
+ echo '# Handle with care, only touch if you need to!'
+ read -r line
+ [[ # This file will only be used on unattended initial install. =~ ^(#)?[a-zA-Z] ]]
+ echo '# This file will only be used on unattended initial install.'
+ read -r line
+ [[ # If you want to change anything after unattended install completed, use menu in openhabian-config. =~ ^(#)?[a-zA-Z] ]]
+ echo '# If you want to change anything after unattended install completed, use menu in openhabian-config.'
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # ATTENTION: to disable an option a line MUST be of the format '# option=value' =~ ^(#)?[a-zA-Z] ]]
+ echo '# ATTENTION: to disable an option a line MUST be of the format '\''# option=value'\'''
+ read -r line
+ [[ # KEEP THE SPACE IT IS IMPORTANT !! =~ ^(#)?[a-zA-Z] ]]
+ echo '# KEEP THE SPACE IT IS IMPORTANT !!'
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # Hostname to set this one to =~ ^(#)?[a-zA-Z] ]]
+ echo '# Hostname to set this one to'
+ read -r line
+ [[ hostname=openhabian =~ ^(#)?[a-zA-Z] ]]
+ parsed=hostname=openhabian
+ [[ hostname=openhabian =~ ^#[a-zA-Z] ]]
++ echo hostname=openhabian
++ cut -d= -f1
+ param=hostname
+ [[ -v hostname ]]
+ [[ openhabian == *\ * ]]
+ echo hostname=openhabian
+ read -r line
+ [[ # if it exists, the default user (with its working environment) will be renamed to this username given here ... =~ ^(#)?[a-zA-Z] ]]
+ echo '# if it exists, the default user (with its working environment) will be renamed to this username given here ...'
+ read -r line
+ [[ username=openhabian =~ ^(#)?[a-zA-Z] ]]
+ parsed=username=openhabian
+ [[ username=openhabian =~ ^#[a-zA-Z] ]]
++ echo username=openhabian
++ cut -d= -f1
+ param=username
+ [[ -v username ]]
+ [[ openhabian == *\ * ]]
+ echo username=openhabian
+ read -r line
+ [[ # ... and given this password. The password will be removed from this file after completion for security reasons. =~ ^(#)?[a-zA-Z] ]]
+ echo '# ... and given this password. The password will be removed from this file after completion for security reasons.'
+ read -r line
+ [[ userpw=openhabian =~ ^(#)?[a-zA-Z] ]]
+ parsed=userpw=openhabian
+ [[ userpw=openhabian =~ ^#[a-zA-Z] ]]
++ echo userpw=openhabian
++ cut -d= -f1
+ param=userpw
+ [[ -v userpw ]]
+ [[ openhabian == *\ * ]]
+ echo userpw=openhabian
+ read -r line
+ [[ # set this to download a SSH key and authorize the owner to login as the admin user =~ ^(#)?[a-zA-Z] ]]
+ echo '# set this to download a SSH key and authorize the owner to login as the admin user'
+ read -r line
+ [[ adminkeyurl="" =~ ^(#)?[a-zA-Z] ]]
+ parsed='adminkeyurl=""'
+ [[ adminkeyurl="" =~ ^#[a-zA-Z] ]]
++ echo 'adminkeyurl=""'
++ cut -d= -f1
+ param=adminkeyurl
+ [[ -v adminkeyurl ]]
+ [[ '' == *\ * ]]
+ echo adminkeyurl=
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # Language and timezone. See Debian documentation for valid values. =~ ^(#)?[a-zA-Z] ]]
+ echo '# Language and timezone. See Debian documentation for valid values.'
+ read -r line
+ [[ timezone=Europe/Berlin =~ ^(#)?[a-zA-Z] ]]
+ parsed=timezone=Europe/Berlin
+ [[ timezone=Europe/Berlin =~ ^#[a-zA-Z] ]]
++ echo timezone=Europe/Berlin
++ cut -d= -f1
+ param=timezone
+ [[ -v timezone ]]
+ [[ Europe/Berlin == *\ * ]]
+ echo timezone=Europe/Berlin
+ read -r line
+ [[ locales="en_US.UTF-8 de_DE.UTF-8" =~ ^(#)?[a-zA-Z] ]]
+ parsed='locales="en_US.UTF-8 de_DE.UTF-8"'
+ [[ locales="en_US.UTF-8 de_DE.UTF-8" =~ ^#[a-zA-Z] ]]
++ echo 'locales="en_US.UTF-8 de_DE.UTF-8"'
++ cut -d= -f1
+ param=locales
+ [[ -v locales ]]
+ [[ en_US.UTF-8 de_DE.UTF-8 == *\ * ]]
+ echo 'locales="en_US.UTF-8 de_DE.UTF-8"'
+ read -r line
+ [[ system_default_locale="en_US.UTF-8" =~ ^(#)?[a-zA-Z] ]]
+ parsed='system_default_locale="en_US.UTF-8"'
+ [[ system_default_locale="en_US.UTF-8" =~ ^#[a-zA-Z] ]]
++ echo 'system_default_locale="en_US.UTF-8"'
++ cut -d= -f1
+ param=system_default_locale
+ [[ -v system_default_locale ]]
+ [[ en_US.UTF-8 == *\ * ]]
+ echo system_default_locale=en_US.UTF-8
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # WiFi settings. An ethernet connection is recommended. =~ ^(#)?[a-zA-Z] ]]
+ echo '# WiFi settings. An ethernet connection is recommended.'
+ read -r line
+ [[ # If you have a RPi4, RPi3, RPi0W or a supported external WiFi dongle, the WiFi =~ ^(#)?[a-zA-Z] ]]
+ echo '# If you have a RPi4, RPi3, RPi0W or a supported external WiFi dongle, the WiFi'
+ read -r line
+ [[ # interface can be setup and used for the initial installation. =~ ^(#)?[a-zA-Z] ]]
+ echo '# interface can be setup and used for the initial installation.'
+ read -r line
+ [[ # Fill in your SSID and password below, leave empty or put comment in front to =~ ^(#)?[a-zA-Z] ]]
+ echo '# Fill in your SSID and password below, leave empty or put comment in front to'
+ read -r line
+ [[ # have your WiFi remain unchanged/uninitialized. Make sure your Ethernet works. =~ ^(#)?[a-zA-Z] ]]
+ echo '# have your WiFi remain unchanged/uninitialized. Make sure your Ethernet works.'
+ read -r line
+ [[ # ATTENTION: you need to escape these special characters: $, `, ", \, (newline) =~ ^(#)?[a-zA-Z] ]]
+ echo '# ATTENTION: you need to escape these special characters: $, `, ", \, (newline)'
+ read -r line
+ [[ # 'Escaping' means to put an additional \ in front of that character =~ ^(#)?[a-zA-Z] ]]
+ echo '# '\''Escaping'\'' means to put an additional \ in front of that character'
+ read -r line
+ [[ wifi_ssid="" =~ ^(#)?[a-zA-Z] ]]
+ parsed='wifi_ssid=""'
+ [[ wifi_ssid="" =~ ^#[a-zA-Z] ]]
++ echo 'wifi_ssid=""'
++ cut -d= -f1
+ param=wifi_ssid
+ [[ -v wifi_ssid ]]
+ [[ '' == *\ * ]]
+ echo wifi_ssid=
+ read -r line
+ [[ wifi_password="" =~ ^(#)?[a-zA-Z] ]]
+ parsed='wifi_password=""'
+ [[ wifi_password="" =~ ^#[a-zA-Z] ]]
++ echo 'wifi_password=""'
++ cut -d= -f1
+ param=wifi_password
+ [[ -v wifi_password ]]
+ [[ '' == *\ * ]]
+ echo wifi_password=
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # Wi-Fi setting. Select a two-letter country code suitable for your location =~ ^(#)?[a-zA-Z] ]]
+ echo '# Wi-Fi setting. Select a two-letter country code suitable for your location'
+ read -r line
+ [[ # E.g. US (default), DE, AU, NZ... =~ ^(#)?[a-zA-Z] ]]
+ echo '# E.g. US (default), DE, AU, NZ...'
+ read -r line
+ [[ # You may infringe on local legislature otherwise =~ ^(#)?[a-zA-Z] ]]
+ echo '# You may infringe on local legislature otherwise'
+ read -r line
+ [[ # See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 or /usr/share/zoneinfo/zone.tab =~ ^(#)?[a-zA-Z] ]]
+ echo '# See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 or /usr/share/zoneinfo/zone.tab'
+ read -r line
+ [[ wifi_country="" =~ ^(#)?[a-zA-Z] ]]
+ parsed='wifi_country=""'
+ [[ wifi_country="" =~ ^#[a-zA-Z] ]]
++ echo 'wifi_country=""'
++ cut -d= -f1
+ param=wifi_country
+ [[ -v wifi_country ]]
+ [[ '' == *\ * ]]
+ echo wifi_country=
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # Eventually disable all IPv6 e.g. on installation problems =~ ^(#)?[a-zA-Z] ]]
+ echo '# Eventually disable all IPv6 e.g. on installation problems'
+ read -r line
+ [[ # values: "enable", "disable" =~ ^(#)?[a-zA-Z] ]]
+ echo '# values: "enable", "disable"'
+ read -r line
+ [[ ipv6=enable =~ ^(#)?[a-zA-Z] ]]
+ parsed=ipv6=enable
+ [[ ipv6=enable =~ ^#[a-zA-Z] ]]
++ echo ipv6=enable
++ cut -d= -f1
+ param=ipv6
+ [[ -v ipv6 ]]
+ [[ enable == *\ * ]]
+ echo ipv6=enable
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # repo and branch to clone from =~ ^(#)?[a-zA-Z] ]]
+ echo '# repo and branch to clone from'
+ read -r line
+ [[ repositoryurl=https://github.com/openhab/openhabian.git =~ ^(#)?[a-zA-Z] ]]
+ parsed=repositoryurl=https://github.com/openhab/openhabian.git
+ [[ repositoryurl=https://github.com/openhab/openhabian.git =~ ^#[a-zA-Z] ]]
++ echo repositoryurl=https://github.com/openhab/openhabian.git
++ cut -d= -f1
+ param=repositoryurl
+ [[ -v repositoryurl ]]
+ [[ https://github.com/openhab/openhabian == *\ * ]]
+ echo repositoryurl=https://github.com/openhab/openhabian
+ read -r line
+ [[ clonebranch=openHAB3 =~ ^(#)?[a-zA-Z] ]]
+ parsed=clonebranch=openHAB3
+ [[ clonebranch=openHAB3 =~ ^#[a-zA-Z] ]]
++ echo clonebranch=openHAB3
++ cut -d= -f1
+ param=clonebranch
+ [[ -v clonebranch ]]
+ [[ main == *\ * ]]
+ echo clonebranch=main
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # initial openHAB configuration to import (URL or filename) =~ ^(#)?[a-zA-Z] ]]
+ echo '# initial openHAB configuration to import (URL or filename)'
+ read -r line
+ [[ # the file needs to be a zip archive created from openhab-cli backup =~ ^(#)?[a-zA-Z] ]]
+ echo '# the file needs to be a zip archive created from openhab-cli backup'
+ read -r line
+ [[ # initialconfig=/boot/initial.zip =~ ^(#)?[a-zA-Z] ]]
+ echo '# initialconfig=/boot/initial.zip'
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # debug verbosity mode =~ ^(#)?[a-zA-Z] ]]
+ echo '# debug verbosity mode'
+ read -r line
+ [[ # off, on (verbose output in log) or maximum (show every command) =~ ^(#)?[a-zA-Z] ]]
+ echo '# off, on (verbose output in log) or maximum (show every command)'
+ read -r line
+ [[ debugmode=off =~ ^(#)?[a-zA-Z] ]]
+ parsed=debugmode=off
+ [[ debugmode=off =~ ^#[a-zA-Z] ]]
++ echo debugmode=off
++ cut -d= -f1
+ param=debugmode
+ [[ -v debugmode ]]
+ [[ maximum == *\ * ]]
+ echo debugmode=maximum
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # the framebuffer on RPi is enabled by default =~ ^(#)?[a-zA-Z] ]]
+ echo '# the framebuffer on RPi is enabled by default'
+ read -r line
+ [[ framebuffer=enable =~ ^(#)?[a-zA-Z] ]]
+ parsed=framebuffer=enable
+ [[ framebuffer=enable =~ ^#[a-zA-Z] ]]
++ echo framebuffer=enable
++ cut -d= -f1
+ param=framebuffer
+ [[ -v framebuffer ]]
+ [[ enable == *\ * ]]
+ echo framebuffer=enable
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # fake hardware =~ ^(#)?[a-zA-Z] ]]
+ echo '# fake hardware'
+ read -r line
+ [[ # force treating your box as if it was a ... =~ ^(#)?[a-zA-Z] ]]
+ echo '# force treating your box as if it was a ...'
+ read -r line
+ [[ # pi4, pi4_8gb, cm4, pi400, pi3, cm3, pi3+, cm3+, pi2, pi1, cm1, pi0, pi0w, pi0w2, x86 =~ ^(#)?[a-zA-Z] ]]
+ echo '# pi4, pi4_8gb, cm4, pi400, pi3, cm3, pi3+, cm3+, pi2, pi1, cm1, pi0, pi0w, pi0w2, x86'
+ read -r line
+ [[ # hw= =~ ^(#)?[a-zA-Z] ]]
+ echo '# hw='
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # Hardware architecture =~ ^(#)?[a-zA-Z] ]]
+ echo '# Hardware architecture'
+ read -r line
+ [[ # x86_64, amd64, armv6l, armv7l, aarch64, arm64 =~ ^(#)?[a-zA-Z] ]]
+ echo '# x86_64, amd64, armv6l, armv7l, aarch64, arm64'
+ read -r line
+ [[ # hwarch= =~ ^(#)?[a-zA-Z] ]]
+ echo '# hwarch='
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # OS distribution/release =~ ^(#)?[a-zA-Z] ]]
+ echo '# OS distribution/release'
+ read -r line
+ [[ # Valid arguments: raspios, raspbian, debian, ubuntu, stretch, buster, bullseye, bionic, focal =~ ^(#)?[a-zA-Z] ]]
+ echo '# Valid arguments: raspios, raspbian, debian, ubuntu, stretch, buster, bullseye, bionic, focal'
+ read -r line
+ [[ # osrelease= =~ ^(#)?[a-zA-Z] ]]
+ echo '# osrelease='
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # Java version to install =~ ^(#)?[a-zA-Z] ]]
+ echo '# Java version to install'
+ read -r line
+ [[ java_opt=11 =~ ^(#)?[a-zA-Z] ]]
+ parsed=java_opt=11
+ [[ java_opt=11 =~ ^#[a-zA-Z] ]]
++ echo java_opt=11
++ cut -d= -f1
+ param=java_opt
+ [[ -v java_opt ]]
+ [[ Zulu11-32 == *\ * ]]
+ echo java_opt=Zulu11-32
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # install zram per default, set to "disable" to skip installation =~ ^(#)?[a-zA-Z] ]]
+ echo '# install zram per default, set to "disable" to skip installation'
+ read -r line
+ [[ zraminstall=enable =~ ^(#)?[a-zA-Z] ]]
+ parsed=zraminstall=enable
+ [[ zraminstall=enable =~ ^#[a-zA-Z] ]]
++ echo zraminstall=enable
++ cut -d= -f1
+ param=zraminstall
+ [[ -v zraminstall ]]
+ [[ enable == *\ * ]]
+ echo zraminstall=enable
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # start comitup hotspot if internet is not reachable =~ ^(#)?[a-zA-Z] ]]
+ echo '# start comitup hotspot if internet is not reachable'
+ read -r line
+ [[ hotspot=enable =~ ^(#)?[a-zA-Z] ]]
+ parsed=hotspot=enable
+ [[ hotspot=enable =~ ^#[a-zA-Z] ]]
++ echo hotspot=enable
++ cut -d= -f1
+ param=hotspot
+ [[ -v hotspot ]]
+ [[ enable == *\ * ]]
+ echo hotspot=enable
+ read -r line
+ [[ hotspotpw=openhabian =~ ^(#)?[a-zA-Z] ]]
+ parsed=hotspotpw=openhabian
+ [[ hotspotpw=openhabian =~ ^#[a-zA-Z] ]]
++ echo hotspotpw=openhabian
++ cut -d= -f1
+ param=hotspotpw
+ [[ -v hotspotpw ]]
+ [[ openhabian == *\ * ]]
+ echo hotspotpw=openhabian
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # external SD card device to backup and mirror the internal SD card to =~ ^(#)?[a-zA-Z] ]]
+ echo '# external SD card device to backup and mirror the internal SD card to'
+ read -r line
+ [[ # backupdrive=/dev/sda =~ ^(#)?[a-zA-Z] ]]
+ echo '# backupdrive=/dev/sda'
+ read -r line
+ [[ storageconfig=openhab-dir =~ ^(#)?[a-zA-Z] ]]
+ parsed=storageconfig=openhab-dir
+ [[ storageconfig=openhab-dir =~ ^#[a-zA-Z] ]]
++ echo storageconfig=openhab-dir
++ cut -d= -f1
+ param=storageconfig
+ [[ -v storageconfig ]]
+ [[ openhab-dir == *\ * ]]
+ echo storageconfig=openhab-dir
+ read -r line
+ [[ storagedir=/storage =~ ^(#)?[a-zA-Z] ]]
+ parsed=storagedir=/storage
+ [[ storagedir=/storage =~ ^#[a-zA-Z] ]]
++ echo storagedir=/storage
++ cut -d= -f1
+ param=storagedir
+ [[ -v storagedir ]]
+ [[ /storage == *\ * ]]
+ echo storagedir=/storage
+ read -r line
+ [[ storagetapes=15 =~ ^(#)?[a-zA-Z] ]]
+ parsed=storagetapes=15
+ [[ storagetapes=15 =~ ^#[a-zA-Z] ]]
++ echo storagetapes=15
++ cut -d= -f1
+ param=storagetapes
+ [[ -v storagetapes ]]
+ [[ 15 == *\ * ]]
+ echo storagetapes=15
+ read -r line
+ [[ storagecapacity=1024 =~ ^(#)?[a-zA-Z] ]]
+ parsed=storagecapacity=1024
+ [[ storagecapacity=1024 =~ ^#[a-zA-Z] ]]
++ echo storagecapacity=1024
++ cut -d= -f1
+ param=storagecapacity
+ [[ -v storagecapacity ]]
+ [[ 1024 == *\ * ]]
+ echo storagecapacity=1024
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # mail relay settings =~ ^(#)?[a-zA-Z] ]]
+ echo '# mail relay settings'
+ read -r line
+ [[ # adminmail=john.doe@foo.bar =~ ^(#)?[a-zA-Z] ]]
+ echo '# adminmail=john.doe@foo.bar'
+ read -r line
+ [[ # relayuser=john.doe@foo.bar =~ ^(#)?[a-zA-Z] ]]
+ echo '# relayuser=john.doe@foo.bar'
+ read -r line
+ [[ # relaypass=secret =~ ^(#)?[a-zA-Z] ]]
+ echo '# relaypass=secret'
+ read -r line
+ [[ # smarthost=smtp.gmail.com =~ ^(#)?[a-zA-Z] ]]
+ echo '# smarthost=smtp.gmail.com'
+ read -r line
+ [[ # smartport=587 =~ ^(#)?[a-zA-Z] ]]
+ echo '# smartport=587'
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # Tailscale VPN =~ ^(#)?[a-zA-Z] ]]
+ echo '# Tailscale VPN'
+ read -r line
+ [[ # preauthkey=tskey-xxxxxxxxxxxxxxxxx =~ ^(#)?[a-zA-Z] ]]
+ echo '# preauthkey=tskey-xxxxxxxxxxxxxxxxx'
+ read -r line
+ [[ # tstags=tag:client =~ ^(#)?[a-zA-Z] ]]
+ echo '# tstags=tag:client'
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # Custom log files =~ ^(#)?[a-zA-Z] ]]
+ echo '# Custom log files'
+ read -r line
+ [[ # custom_log_files=("/var/log/foo.log" "/var/log/bar.log") =~ ^(#)?[a-zA-Z] ]]
+ echo '# custom_log_files=("/var/log/foo.log" "/var/log/bar.log")'
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # vim: filetype=sh =~ ^(#)?[a-zA-Z] ]]
+ echo '# vim: filetype=sh'
+ read -r line
+ set_cpu_speed
+ is_raspios
+ [[ '' == \r\a\s\p\i\o\s ]]
+ is_raspbian
+ [[ '' == \r\a\s\p\b\i\a\n ]]
++ cat /etc/os-release
+ [[ PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs" =~ Raspbian ]]
+ return 0
+ return 0
+ running_in_docker
+ [[ -n '' ]]
+ grep -qs 'docker\|lxc' /proc/1/cgroup
+ [[ -f /.dockerenv ]]
+ return 1
+ echo 'GOVERNOR="ondemand"'
+ echo ondemand
+ config_ipv6
+ local aptConf=/etc/apt/apt.conf.d/S90force-ipv4
+ local sysctlConf=/etc/sysctl.d/99-sysctl.conf
+ [[ enable == \d\i\s\a\b\l\e ]]
+ [[ enable == \e\n\a\b\l\e ]]
+ grep -qs '^[[:space:]]*# Disable all IPv6 functionality' /etc/sysctl.d/99-sysctl.conf
+ [[ -n '' ]]
+ apt_update
+ PID_APT=20432
+ whiptail_check
+ apt-get update
++ command -v whiptail
+ [[ -x /usr/bin/whiptail ]]
+ load_create_config
+ local 'questionText=\nWelcome to openHABian!\n\nPlease provide the name of your Linux user i.e. the account you normally log in with.\n\nTypical user names are '\''pi'\'' or '\''ubuntu'\''.'
+ local input
+ [[ -f /etc/openhabian.conf ]]
++ timestamp
++ date +%F_%T_%Z
+ echo -n '2022-01-11_20:58:09_CET [openHABian] Loading configuration file '\''/etc/openhabian.conf'\''... '
2022-01-11_20:58:09_CET [openHABian] Loading configuration file '/etc/openhabian.conf'... ++ getent group openhabian
+ [[ ! -n openhabian:x:1000:openhabian,frontail ]]
+ id -u openhabian
+ source /etc/openhabian.conf
++ hostname=openhabian
++ username=openhabian
++ userpw=openhabian
++ adminkeyurl=
++ timezone=Europe/Berlin
++ locales='en_US.UTF-8 de_DE.UTF-8'
++ system_default_locale=en_US.UTF-8
++ wifi_ssid=
++ wifi_password=
++ wifi_country=
++ ipv6=enable
++ repositoryurl=https://github.com/openhab/openhabian
++ clonebranch=main
++ debugmode=maximum
++ framebuffer=enable
++ java_opt=Zulu11-32
++ zraminstall=enable
++ hotspot=enable
++ hotspotpw=openhabian
++ storageconfig=openhab-dir
++ storagedir=/storage
++ storagetapes=15
++ storagecapacity=1024
+ echo OK
OK
+ openhabian_console_check
+ [[ -z 1 ]]
++ tput cols
+ [[ 207 -ge 120 ]]
+ return 0
+ openhabian_update_check
+ [[ -z 1 ]]
+ local branch
+ local introText
+ local unsupportedOSText
+ branch=main
+ introText='Additions, improvements or fixes were added to the openHABian configuration tool. Would you like to update now and benefit from them? The update will not automatically apply changes to your system.\n\nUpdating is recommended.'
+ unsupportedOSText='You are running an old Linux release that is no longer officially supported.\nWe recommend upgrading to the most current stable release of your distribution (or current Long Term Support version for distributions that offer LTS).\nDo you really want to continue using openHABian on this system?'
++ timestamp
++ date +%F_%T_%Z
++ get_git_revision
++ local branch
++ local commitDate
++ local shorthash
+++ git -C /opt/openhabian rev-parse --abbrev-ref HEAD
++ branch=main
+++ git -C /opt/openhabian log --pretty=format:%aI -n 1
++ commitDate=2022-01-11T20:43:31+01:00
+++ git -C /opt/openhabian log --pretty=format:%h -n 1
++ shorthash=a0d6691
++ echo '[main]{2022-01-11T20:43:31+01:00}(a0d6691)'
+ echo '2022-01-11_20:58:09_CET [openHABian] openHABian configuration tool version: [main]{2022-01-11T20:43:31+01:00}(a0d6691)'
2022-01-11_20:58:09_CET [openHABian] openHABian configuration tool version: [main]{2022-01-11T20:43:31+01:00}(a0d6691)
++ timestamp
++ date +%F_%T_%Z
+ echo -n '2022-01-11_20:58:09_CET [openHABian] Checking for changes in origin branch main... '
2022-01-11_20:58:09_CET [openHABian] Checking for changes in origin branch main... + is_stretch
+ [[ '' == \s\t\r\e\t\c\h ]]
++ cat /etc/os-release
+ [[ PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs" =~ stretch ]]
+ return 1
+ is_xenial
+ [[ '' == \x\e\n\i\a\l ]]
++ cat /etc/os-release
+ [[ PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs" =~ xenial ]]
+ return 1
+ git -C /opt/openhabian config user.email openhabian@openHABian
+ git -C /opt/openhabian config user.name openhabian
+ git -C /opt/openhabian fetch --quiet origin
++ git -C /opt/openhabian rev-parse main
++ git -C /opt/openhabian rev-parse '@{u}'
+ [[ a0d66912181812286c9286c025a118bb483be9f2 == a0d66912181812286c9286c025a118bb483be9f2 ]]
+ echo OK
OK
+ openhabian_announcements
+ [[ -z 1 ]]
+ local altReadNews
+ local newsFile
+ local readNews
+ altReadNews=/tmp/NEWS.md
+ newsFile=/opt/openhabian/NEWS.md
+ readNews=/opt/openhabian/docs/NEWS.md
+ cmp --silent /opt/openhabian/NEWS.md /opt/openhabian/docs/NEWS.md
+ cmp --silent /opt/openhabian/NEWS.md /tmp/NEWS.md
+ cp /opt/openhabian/NEWS.md /opt/openhabian/docs/NEWS.md
++ timestamp
++ date +%F_%T_%Z
+ echo -n '2022-01-11_20:58:11_CET [openHABian] Switching to branch main... '
2022-01-11_20:58:11_CET [openHABian] Switching to branch main... + git -C /opt/openhabian checkout --quiet main
+ echo OK
OK
+ bashrc_copy
++ timestamp
++ date +%F_%T_%Z
+ echo -n '2022-01-11_20:58:11_CET [openHABian] Adding slightly tuned bash configuration files to system... '
2022-01-11_20:58:11_CET [openHABian] Adding slightly tuned bash configuration files to system... + cp /opt/openhabian/includes/generic/bash.bashrc /etc/bash.bashrc
+ cp /opt/openhabian/includes/generic/bashrc-root /root/.bashrc
+ cp /opt/openhabian/includes/generic/bash_profile /home/openhabian/.bash_profile
+ cp /opt/openhabian/includes/generic/bash_aliases /home/openhabian/.bash_aliases
+ chown openhabian:openhabian /home/openhabian/.bash_aliases /home/openhabian/.bash_history /home/openhabian/.bash_logout /home/openhabian/.bash_profile
+ echo OK
OK
+ show_main_menu
+ local choice
+ local version
+++ get_git_revision
+++ local branch
+++ local commitDate
+++ local shorthash
++++ git -C /opt/openhabian rev-parse --abbrev-ref HEAD
+++ branch=main
++++ git -C /opt/openhabian log --pretty=format:%aI -n 1
+++ commitDate=2022-01-11T20:43:31+01:00
++++ git -C /opt/openhabian log --pretty=format:%h -n 1
+++ shorthash=a0d6691
+++ echo '[main]{2022-01-11T20:43:31+01:00}(a0d6691)'
++ whiptail --title 'openHABian Configuration Tool — [main]{2022-01-11T20:43:31+01:00}(a0d6691)' --menu 'Setup Options' 19 116 12 --cancel-button Exit --ok-button Execute '00 | About openHABian' 'Information about the openHABian project and this tool' '' '' '01 | Select Branch' 'Select the openHABian config tool version ("branch") to run' '02 | Upgrade System' 'Update all installed software packages (incl. openHAB) to their latest version' '03 | Install openHAB' 'Install or upgrade to openHAB 3' '04 | Import config' 'Import an openHAB 3 configuration from file or URL' '' '' '10 | Apply Improvements' 'Apply the latest improvements to the basic openHABian setup ►' '20 | Optional Components' 'Choose from a set of optional software components ►' '30 | System Settings' 'A range of system and hardware related configuration steps ►' '40 | openHAB Related' 'Switch the installed openHAB version or apply tweaks ►' '50 | Backup/Restore' 'Manage backups and restore your system ►'
+ choice='50 | Backup/Restore'
+ RET=0
+ '[' 0 -eq 1 ']'
+ '[' 0 -eq 255 ']'
+ [[ 50 | Backup/Restore == '' ]]
+ [[ 50 | Backup/Restore == \0\0* ]]
+ [[ 50 | Backup/Restore == \0\1* ]]
+ [[ 50 | Backup/Restore == \0\2* ]]
+ [[ 50 | Backup/Restore == \0\3* ]]
+ [[ 50 | Backup/Restore == \0\4* ]]
+ [[ 50 | Backup/Restore == \1\0* ]]
+ [[ 50 | Backup/Restore == \2\0* ]]
+ [[ 50 | Backup/Restore == \3\0* ]]
+ [[ 50 | Backup/Restore == \4\0* ]]
+ [[ 50 | Backup/Restore == \5\0* ]]
+++ get_git_revision
+++ local branch
+++ local commitDate
+++ local shorthash
++++ git -C /opt/openhabian rev-parse --abbrev-ref HEAD
+++ branch=main
++++ git -C /opt/openhabian log --pretty=format:%aI -n 1
+++ commitDate=2022-01-11T20:43:31+01:00
++++ git -C /opt/openhabian log --pretty=format:%h -n 1
+++ shorthash=a0d6691
+++ echo '[main]{2022-01-11T20:43:31+01:00}(a0d6691)'
++ whiptail --title 'openHABian Configuration Tool — [main]{2022-01-11T20:43:31+01:00}(a0d6691)' --menu Backup/Restore 15 116 8 --cancel-button Back --ok-button Execute '50 | Backup openHAB config' 'Backup the current active openHAB configuration' '51 | Restore an openHAB config' 'Restore an openHAB configuration from backup zipfile' '   | Restore text only config' 'Restore text only configuration without restarting' '52 | Amanda System Backup' 'Set up Amanda to comprehensively backup your complete openHABian box' '53 | Setup SD mirroring' 'Setup mirroring of internal to external SD card' '   | Remove SD mirroring' 'Disable mirroring of SD cards' '54 | Raw copy SD' 'Raw copy internal SD to external disk / SD card' '55 | Sync SD' 'Rsync internal SD to external disk / SD card'
+ choice2='52 | Amanda System Backup'
+ '[' 0 -eq 1 ']'
+ '[' 1 -eq 255 ']'
+ case "$choice2" in
+ wait_for_apt_to_finish_update
++ timestamp
++ date +%F_%T_%Z
+ echo -n '2022-01-11_20:58:20_CET [openHABian] Updating Linux package information... '
2022-01-11_20:58:20_CET [openHABian] Updating Linux package information... + [[ -z 20432 ]]
+ tail --pid=20432 -f /dev/null
+ echo OK
OK
+ amanda_setup
+ [[ -z 1 ]]
+ local config
+ local backupUser=backup
+ local tapes
+ local tapeSize
+ local storageLoc
+ local adminMail=root@openhabian
+ local awsSite
+ local awsBucket
+ local awsAccessKey
+ local awsSecretKey
+ local backupPass
+ local backupPass1
+ local backupPass2
+ local 'queryText=You are about to install the Amanda backup solution.\nDocumentation is available at '\''/opt/openhabian/docs/openhabian-amanda.md'\'' or https://github.com/openhab/openhabian/blob/main/docs/openhabian-amanda.md\nHave you read this document? If not, please do so now, as you will need to follow the instructions provided there in order to successfully complete installation of Amanda.\n\nProceeding will setup a backup mechanism to allow for saving your openHAB setup and modifications to either USB attached or Amazon cloud storage.\nYou can add your own files/directories to be backed up, and you can store and create clones of your openHABian SD card to have an pre-prepared replacement in case of card failures.\n\nWARNING: running this setup will overwrite any previous Amanda backup configurations.\n\nWould you like to begin setup?'
+ local 'successText=Setup was successful.\n\nAmanda backup tool is now taking backups around 01:00. For further readings, start at http://wiki.zmanda.com/index.php/User_documentation.'
++ timestamp
++ date +%F_%T_%Z
+ echo -n '2022-01-11_20:58:20_CET [openHABian] Beginning setup of the Amanda backup system... '
2022-01-11_20:58:20_CET [openHABian] Beginning setup of the Amanda backup system... + whiptail --title 'Amanda backup installation' --yes-button Continue --no-button Cancel --defaultno --yesno 'You are about to install the Amanda backup solution.\nDocumentation is available at '\''/opt/openhabian/docs/openhabian-amanda.md'\'' or https://github.com/openhab/openhabian/blob/main/docs/openhabian-amanda.md\nHave you read this document? If not, please do so now, as you will need to follow the instructions provided there in order to successfully complete installation of Amanda.\n\nProceeding will setup a backup mechanism to allow for saving your openHAB setup and modifications to either USB attached or Amazon cloud storage.\nYou can add your own files/directories to be backed up, and you can store and create clones of your openHABian SD card to have an pre-prepared replacement in case of card failures.\n\nWARNING: running this setup will overwrite any previous Amanda backup configurations.\n\nWould you like to begin setup?' 24 80
+ echo OK
OK
+ [[ -z '' ]]
++ whiptail --title 'Authentication setup' --passwordbox '\nEnter a password for backup:' 9 80
+ backupPass1=openhabian
++ whiptail --title 'Authentication setup' --passwordbox '\nPlease confirm the password:' 9 80
+ backupPass2=openhabian
+ [[ openhabian == \o\p\e\n\h\a\b\i\a\n ]]
+ [[ 10 -ge 8 ]]
+ [[ 10 -ge 8 ]]
+ backupPass=openhabian
+ [[ -z openhabian ]]
+ amanda_install openhabian
+ local backupUser=backup
+ local backupPass=openhabian
++ timestamp
++ date +%F_%T_%Z
+ echo -n '2022-01-11_20:58:29_CET [openHABian] Configuring Amanda backup system prerequisites... '
2022-01-11_20:58:29_CET [openHABian] Configuring Amanda backup system prerequisites... + echo backup:openhabian
+ cond_redirect chpasswd
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chpasswd \033[39;49;00m'

$ chpasswd
+ chpasswd
+ return 0
+ grep -qs '^[[:space:]]*backup:' /etc/group
+ cond_redirect usermod --append --groups backup openhabian
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ usermod --append --groups backup openhabian \033[39;49;00m'

$ usermod --append --groups backup openhabian
+ usermod --append --groups backup openhabian
+ return 0
+ cond_redirect usermod --append --groups backup backup
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ usermod --append --groups backup backup \033[39;49;00m'

$ usermod --append --groups backup backup
+ usermod --append --groups backup backup
+ return 0
+ cond_redirect chsh --shell /bin/bash backup
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chsh --shell /bin/bash backup \033[39;49;00m'

$ chsh --shell /bin/bash backup
+ chsh --shell /bin/bash backup
+ return 0
+ echo OK
OK
+ amanda_is_installed
+ dpkg -s amanda-common amanda-server amanda-client
+ return 0
+ dpkg -s exim4
++ whiptail --title 'Reporting address' --inputbox '\nEnter a mail address to have Amanda send reports to:' 9 80 root@openhabian
+ adminMail=raspi@sosh-home.de
+ whiptail --title 'Backup using locally attached storage' --yes-button Yes --no-button No --yesno 'Would you like to setup a backup mechanism based on locally attached or NAS mounted storage?' 8 80
+ config=openhab-dir
++ whiptail --title 'Storage directory' --inputbox '\nWhat is the directory backups should be stored in?\n\nYou can specify any locally accessible directory, no matter if it'\''s located on the internal SD card, an external USB-attached device such as a USB stick, HDD, or a NFS/CIFS share.' 13 80
+ storageLoc=/storage/Backup
+ cond_redirect sudo -u backup touch /storage/Backup/TEST
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ sudo -u backup touch /storage/Backup/TEST \033[39;49;00m'

$ sudo -u backup touch /storage/Backup/TEST
+ sudo -u backup touch /storage/Backup/TEST
+ return 0
+ rm -f /storage/Backup/TEST
+ tapes=15
++ whiptail --title 'Storage capacity' --inputbox '\nHow much storage do you want to dedicate to your backup in megabytes?\n\nRecommendation: 2-3 times the amount of data to be backed up.' 11 80
+ tapeSize=50000
+ (( tapeSize/=tapes ))
+ create_amanda_config openhab-dir backup raspi@sosh-home.de 15 3333 /storage/Backup
+ local adminMail
+ local amandaHosts=/var/backups/.amandahosts
+ local amandaSecurityConf=/etc/amanda-security.conf
+ local amandaIncludesDir=/opt/openhabian/includes/amanda
+ local awsAccessKey
+ local awsBucket
+ local awsSecretKey
+ local awsSite
+ local backupUser
+ local config
+ local configDir
+ local databaseDir
+ local dumpType=comp-user-tar
+ local indexDir
+ local logDir
+ local serviceTargetDir=/etc/systemd/system
+ local storageLoc
+ local storageText
+ local tapeChanger
+ local tapes
+ local tapeSize
+ local tapeType
+ config=openhab-dir
+ backupUser=backup
+ adminMail=raspi@sosh-home.de
+ tapes=15
+ tapeSize=3333
+ storageLoc=/storage/Backup
+ awsSite=
+ awsBucket=
+ awsAccessKey=
+ awsSecretKey=
+ configDir=/etc/amanda/openhab-dir
+ databaseDir=/var/lib/amanda/openhab-dir/curinfo
+ indexDir=/var/lib/amanda/openhab-dir/index
+ logDir=/var/log/amanda/openhab-dir
+ storageText='We need to prepare ("label") your storage media.\n\nFor permanent storage such as USB or NAS mounted storage, as well as for cloud based storage, we will create 15 virtual containers.'
++ timestamp
++ date +%F_%T_%Z
+ echo -n '2022-01-11_21:01:16_CET [openHABian] Creating Amanda filesystem... '
2022-01-11_21:01:16_CET [openHABian] Creating Amanda filesystem... + cond_redirect mkdir -p /etc/amanda/openhab-dir /var/lib/amanda/openhab-dir/curinfo /var/log/amanda/openhab-dir /var/lib/amanda/openhab-dir/index
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ mkdir -p /etc/amanda/openhab-dir /var/lib/amanda/openhab-dir/curinfo /var/log/amanda/openhab-dir /var/lib/amanda/openhab-dir/index \033[39;49;00m'

$ mkdir -p /etc/amanda/openhab-dir /var/lib/amanda/openhab-dir/curinfo /var/log/amanda/openhab-dir /var/lib/amanda/openhab-dir/index
+ mkdir -p /etc/amanda/openhab-dir /var/lib/amanda/openhab-dir/curinfo /var/log/amanda/openhab-dir /var/lib/amanda/openhab-dir/index
+ return 0
+ cond_redirect touch /etc/amanda/openhab-dir/tapelist
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ touch /etc/amanda/openhab-dir/tapelist \033[39;49;00m'

$ touch /etc/amanda/openhab-dir/tapelist
+ touch /etc/amanda/openhab-dir/tapelist
+ return 0
++ dig +short openhabian
+ ip=192.168.1.147
++ host 192.168.1.147
++ cut '-d ' -f1
+ revip='147.1.168.192.in-addr.arpa
147.1.168.192.in-addr.arpa'
+ [[ -n 147.1.168.192.in-addr.arpa
147.1.168.192.in-addr.arpa ]]
+ echo -e '192.168.1.147 backup amdump\n147.1.168.192.in-addr.arpa
147.1.168.192.in-addr.arpa backup amdump'
+ echo -e 'openhabian backup amdump\nopenhabian root amindexd amidxtaped\nlocalhost backup\nlocalhost root amindexd amidxtaped'
+ is_aarch64
+ [[ '' == \a\a\r\c\h\6\4 ]]
+ [[ '' == \a\r\m\6\4 ]]
+ case "$(uname -m)" in
++ uname -m
+ return 1
+ GNUTAR=/usr/bin/tar
+ echo -e 'amgtar:gnutar_path=/usr/bin/tar\n'
+ cond_redirect chown --recursive backup:backup /var/backups/.amandahosts /etc/amanda/openhab-dir /var/lib/amanda/openhab-dir/curinfo /var/lib/amanda/openhab-dir/index /var/log/amanda
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chown --recursive backup:backup /var/backups/.amandahosts /etc/amanda/openhab-dir /var/lib/amanda/openhab-dir/curinfo /var/lib/amanda/openhab-dir/index /var/log/amanda \033[39;49;00m'

$ chown --recursive backup:backup /var/backups/.amandahosts /etc/amanda/openhab-dir /var/lib/amanda/openhab-dir/curinfo /var/lib/amanda/openhab-dir/index /var/log/amanda
+ chown --recursive backup:backup /var/backups/.amandahosts /etc/amanda/openhab-dir /var/lib/amanda/openhab-dir/curinfo /var/lib/amanda/openhab-dir/index /var/log/amanda
+ return 0
+ [[ openhab-dir == \o\p\e\n\h\a\b\-\d\i\r ]]
+ cond_redirect chown --recursive backup:backup /storage/Backup
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chown --recursive backup:backup /storage/Backup \033[39;49;00m'

$ chown --recursive backup:backup /storage/Backup
+ chown --recursive backup:backup /storage/Backup
+ return 0
+ cond_redirect chmod --recursive g+rxw /storage/Backup
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chmod --recursive g+rxw /storage/Backup \033[39;49;00m'

$ chmod --recursive g+rxw /storage/Backup
+ chmod --recursive g+rxw /storage/Backup
+ return 0
+ cond_redirect sudo -u backup 'mkdir /storage/Backup/slots'
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ sudo -u backup mkdir /storage/Backup/slots \033[39;49;00m'

$ sudo -u backup mkdir /storage/Backup/slots
+ sudo -u backup 'mkdir /storage/Backup/slots'
sudo: mkdir /storage/Backup/slots: command not found
+ return 1
+ echo 'FAILED (storage write access for user backup - bad NAS uid mapping ?)'
FAILED (storage write access for user backup - bad NAS uid mapping ?)
+ return 1
+ return 1
+ '[' 1 -ne 0 ']'
+ whiptail --msgbox 'There was an error or interruption during the execution of:\n  "50 | Backup/Restore"\n\nPlease try again. If the error persists, please read /opt/openhabian/docs/openhabian-DEBUG.md or https://github.com/openhab/openhabian/blob/main/docs/openhabian-DEBUG.md how to proceed.' 14 80
+ return 0
+ true
+ show_main_menu
+ local choice
+ local version
+++ get_git_revision
+++ local branch
+++ local commitDate
+++ local shorthash
++++ git -C /opt/openhabian rev-parse --abbrev-ref HEAD
+++ branch=main
++++ git -C /opt/openhabian log --pretty=format:%aI -n 1
+++ commitDate=2022-01-11T20:43:31+01:00
++++ git -C /opt/openhabian log --pretty=format:%h -n 1
+++ shorthash=a0d6691
+++ echo '[main]{2022-01-11T20:43:31+01:00}(a0d6691)'
++ whiptail --title 'openHABian Configuration Tool — [main]{2022-01-11T20:43:31+01:00}(a0d6691)' --menu 'Setup Options' 19 116 12 --cancel-button Exit --ok-button Execute '00 | About openHABian' 'Information about the openHABian project and this tool' '' '' '01 | Select Branch' 'Select the openHABian config tool version ("branch") to run' '02 | Upgrade System' 'Update all installed software packages (incl. openHAB) to their latest version' '03 | Install openHAB' 'Install or upgrade to openHAB 3' '04 | Import config' 'Import an openHAB 3 configuration from file or URL' '' '' '10 | Apply Improvements' 'Apply the latest improvements to the basic openHABian setup ►' '20 | Optional Components' 'Choose from a set of optional software components ►' '30 | System Settings' 'A range of system and hardware related configuration steps ►' '40 | openHAB Related' 'Switch the installed openHAB version or apply tweaks ►' '50 | Backup/Restore' 'Manage backups and restore your system ►'
+ choice=
+ RET=255
+ '[' 255 -eq 1 ']'
+ '[' 255 -eq 255 ']'
+ return 255
+ system_check_default_password
+ is_pi
+ is_pifour
+ [[ '' == \p\i\4 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]11[0-9a-fA-F]$' /proc/cpuinfo
+ return 0
+ return 0
+ local algo
+ local defaultPassword
+ local defaultUser
+ local generatedPassword
+ local introText
+ local originalPassword
+ local salt
+ is_pi
+ is_pifour
+ [[ '' == \p\i\4 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]11[0-9a-fA-F]$' /proc/cpuinfo
+ return 0
+ return 0
+ id -u pi
+ is_pi
+ is_pifour
+ [[ '' == \p\i\4 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]11[0-9a-fA-F]$' /proc/cpuinfo
+ return 0
+ return 0
+ defaultUser=openhabian
+ defaultPassword=openhabian
++ grep -w openhabian /etc/shadow
++ cut -d: -f2
+ originalPassword='$6$uwARqIrZsn9twldU$kR4rsOp4bgOc/GbhZdsQqrLrRuspgbfL19WLgqW0LgRb4d/gFeGQaLytwqv5rxcm8G3SxAno8oWEFDuXpI4Ms0'
++ echo '$6$uwARqIrZsn9twldU$kR4rsOp4bgOc/GbhZdsQqrLrRuspgbfL19WLgqW0LgRb4d/gFeGQaLytwqv5rxcm8G3SxAno8oWEFDuXpI4Ms0'
++ cut '-d$' -f2
^[+ algo=6
+ introText='The default password was detected on your system! That is a serious security concern. Bad guys or malicious programs in your subnet are able to gain root access!\n\nPlease set a strong password by typing the command '\''passwd openhabian'\''!'
++ echo '$6$uwARqIrZsn9twldU$kR4rsOp4bgOc/GbhZdsQqrLrRuspgbfL19WLgqW0LgRb4d/gFeGQaLytwqv5rxcm8G3SxAno8oWEFDuXpI4Ms0'
++ cut '-d$' -f3
+ salt=uwARqIrZsn9twldU
+ export algo defaultPassword salt
++ perl -le 'print crypt("$ENV{defaultPassword}","\$$ENV{algo}\$$ENV{salt}\$")'
+ generatedPassword='$6$uwARqIrZsn9twldU$kR4rsOp4bgOc/GbhZdsQqrLrRuspgbfL19WLgqW0LgRb4d/gFeGQaLytwqv5rxcm8G3SxAno8oWEFDuXpI4Ms0'
++ timestamp
++ date +%F_%T_%Z
+ echo -n '2022-01-11_21:01:25_CET [openHABian] Checking for default openHABian username:password combination... '
2022-01-11_21:01:25_CET [openHABian] Checking for default openHABian username:password combination... ++ id -u openhabian
+ [[ -n 1000 ]]
+ [[ $6$uwARqIrZsn9twldU$kR4rsOp4bgOc/GbhZdsQqrLrRuspgbfL19WLgqW0LgRb4d/gFeGQaLytwqv5rxcm8G3SxAno8oWEFDuXpI4Ms0 == \$\6\$\u\w\A\R\q\I\r\Z\s\n\9\t\w\l\d\U\$\k\R\4\r\s\O\p\4\b\g\O\c\/\G\b\h\Z\d\s\Q\q\r\L\r\R\u\s\p\g\b\f\L\1\9\W\L\g\q\W\0\L\g\R\b\4\d\/\g\F\e\G\Q\a\L\y\t\w\q\v\5\r\x\c\m\8\G\3\S\x\A\n\o\8\o\W\E\F\D\u\X\p\I\4\M\s\0 ]]
+ [[ -n 1 ]]
+ whiptail --title 'Default password detected' --msgbox 'The default password was detected on your system! That is a serious security concern. Bad guys or malicious programs in your subnet are able to gain root access!\n\nPlease set a strong password by typing the command '\''passwd openhabian'\''!' 11 80
^[+ echo FAILED
FAILED
++ timestamp
++ date +%F_%T_%Z
+ echo -e '2022-01-11_21:01:26_CET [openHABian] We hope you got what you came for! See you again soon ;)'
2022-01-11_21:01:26_CET [openHABian] We hope you got what you came for! See you again soon ;)
+ cd /opt


try again

Thanks!
setup was succesful! Thanks for the magic you’ve done in the background !
Best regads
Sebastian

Hello,
I’ve got the same problem with the installation of amanda (using it since years but depending on a few problems in the past I had to re-run the install-routine of amanda in openhabian-config). I get the following error-message:

$ sudo -u backup mkdir /mnt/nas/raspi_openhab3/amanda/slots 
+ sudo -u backup mkdir /mnt/nas/raspi_openhab3/amanda/slots
mkdir: cannot create directory ‘/mnt/nas/raspi_openhab3/amanda/slots’: File exists
+ return 1
+ echo 'FAILED (storage write access for user backup - bad NAS uid mapping ?)'
FAILED (storage write access for user backup - bad NAS uid mapping ?)
+ return 1
+ return 1
+ '[' 1 -ne 0 ']'
+ whiptail --msgbox 'There was an error or interruption during the execution of:\n  "50 | Backup/Restore"\n\nPlease try again. If the error persists, please read /opt/openhabian/docs/openhabian-DEBUG.md or https://github.com/openhab/openhabian/blob/main/docs/openhabian-DEBUG.md how to proceed.' 14 80
+ return 0

The rights on my NAS should be set properly (used “no_root_squash”):

Does anybody knows what I made wrong?

Reading the error message I would interpret it that the problem is that the directory called slots already exists. It cannot be created because it is already there.
It looks like value 1 then is returned and the higher level function then just says that there would be missing privileges.

Hello Wolfgang,
that was the correct point!
Mea culpa! I’ve overseen that the reason was because the directory exists (I should have read the log correctly).
Now it works. Many thanks!

1 Like