Closed PatrickGlatz closed 3 years ago
The issue is with the openhab package I think
Running apt-get install --allow-downgrades --yes openhab=3.0.0~M5-1 openhab-addons=3.0.0~M5-1
shouldn't ask for input
@BClark09 wdyt or am I mistaken? cc: @ecdye
apt-get install --allow-downgrades --yes openhab=3.0.0~M5-1 openhab-addons=3.0.0~M5-1
shouldn't ask for input
The --yes flag only answers the "are you sure" questions before installation. It doesn't automatically answer yes to all user prompts, such as replacing a user's configuration files. If the script is supposed to be non-interactive then you should add:
export DEBIAN_FRONTEND=noninteractive
This should answer the default (no) for questions asked in this issue but I would argue that this would not be the best answer for an upgrade, particularly from openHAB 2 to openHAB 3, which should replace these files to the maintainer's versions. To do this you'll need to add to the apt line:
apt-get install --allow-downgrades --yes --option Dpkg::Options::="--force-confnew" openhab=3.0.0~M5-1 openhab-addons=3.0.0~M5-1
Thanks Ben DEBIAN_FRONTEND=noninteractive is set on unattended install (see openhabian-setup.conf) so I wonder if we should make that apply, too (i.e. for the interactive-at-least-in_theory installs of openhab package) ? Sort of does not feel right, but where we don't we will have to allow for interactivity (i.e. no output redirection). Either way you're right that we should inject maintainer versions so I'll change the command to your proposal.
Hello @mstormi,
i had several difficulties to set up OH3 on a fresh system. As ou have requested i have reworked it. This is what i found and what my approach was finally:
## Issue information: grabbed a fresh sealed SD card, openHABian v1.6.1 32bit, used Raspberry Pi Imager on a Mac, wrote the image, edited the openhabian.conf with the following fields: hostname=openHAB username=openhabadm userpw=xxxxxx debugmode=maximum
Inserted the SD card, waited for 1 hour, ssh'd to the pi, executed
sudo openhabian-config
went to '40 | openHAB related' and then '42 | Upgrade to openHAB 3'. Confirmed all message boxes. The installation was ongoing but then it stopped and asked if i want to use the local or the repo version of several files, like /etc/openhab/services/addons.cfg /etc/openhab/services/runtime.cfg /var/lib/openhab/etc/org.ops4j.pax.logging.cfg /var/lib/openhab/etc/users.properties /var/lib/openhab/etc/keystoreWhen debugmode is set to 'off' these questions are not appearing and the installation stucks!!! No information on what is going on, no option to interrupt.
What i would expect is, that even with debugmode=off the installation runs through, using either default values or interrupting and asking.
Another issue is, that the installation finally fails with hint to the zramsync directory not being copied. This is why ZRAM activation fails. I guess it is related to this issue: #1287
Thanks in advance Patrick
## System information: Raspberry Pi 4, 4GB openhabian v1.6.1 32bit SanDisk ultra micro SDHC 16GB Original Raspberry Pi 4 power supply
[13:31:33] localadm@Mac: 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" [13:31:34] localadm@Mac: uname -m armv7l