Mapdb: no restore at startup for item status

No, I’m unable to find out if it’s just a matter of timing in boot up services. I begin to think this whole business is a matter of timing.

Looking at a very old mysql/restore issue enlightened me some.
Restore is carried out by PerstenceManager so that’s what you need DEBUG from.
In that old issue it tried before mysql was ready and so no restore happened.
I’m thinking what happens here when mapdb comes ready, and/or when zram changes its database files around.

which debug exactly?

I don’t know, it is hard to find these things out. But that is the service that initiates restore and interrogates db for the purpose.

I’ve found out that under some (as of now unknown) conditions, the system does not properly stop ZRAM on “reboot”.
So for the time being, please manually execute zram-config stop before reboot and see if that makes a difference

2020-08-07 14:59:14.947 [vent.ItemStateChangedEvent] - TestDateTime changed from 2020-08-07T12:32:47.000+0100 to 2020-08-07T14:59:14.935+0100

[15:01:08] root@openhab:/home/openhabian# systemctl stop zram-config
[15:01:20] root@openhab:/home/openhabian# reboot
[15:08:39] openhabian@openhab:~$ zramctl
NAME       ALGORITHM DISKSIZE  DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram2 lzo           500M 24.9M 72.5K  436K       4 /opt/zram/zram2
/dev/zram1 lzo           500M 16.5M 17.2K  200K       4 /opt/zram/zram1
/dev/zram0 lzo           600M    4K   89B   12K       4 [SWAP]

2020-08-07 15:02:45.870 [vent.ItemStateChangedEvent] - TestDateTime changed from NULL to 2020-08-07T14:59:14.000+0100

another try…
2020-08-07 15:10:03.279 [vent.ItemStateChangedEvent] - TestDateTime changed from 2020-08-07T14:59:14.000+0100 to 2020-08-07T15:10:03.266+0100

stop zram-conf, reboot

NAME       ALGORITHM DISKSIZE  DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram2 lzo           500M 24.9M 77.4K  448K       4 /opt/zram/zram2
/dev/zram1 lzo           500M 16.5M 17.1K  180K       4 /opt/zram/zram1
/dev/zram0 lzo           600M    4K   89B   12K       4 [SWAP]

2020-08-07 15:12:59.860 [vent.ItemStateChangedEvent] - TestDateTime changed from NULL to 2020-08-07T15:10:03.000+0100

looks good! also my “other” testitems were restored as expected.
is this also related to the few times when zram didn’t start on boot or is that another issue?

Two things to try:
First, change the line RemainAfterExit=true in /etc/systemd/system/zram-config.service then do
systemctl enable zram-sync; systemctl daemon-reload and see if you can reboot without stopping ZRAM first.

If that does not work, second create /etc/systemd/system/zram-sync.service to contain the following,

[Unit]
Description=zram sync on shutdown/reboot
PartOf=openhab2.service
Before=reboot.target shutdown.target poweroff.target halt.target

[Service]
Type=oneshot
ExecStart=/usr/local/bin/zram-config stop
ExecStop=/usr/local/bin/zram-config stop
TimeoutSec=0
RemainAfterExit=true

[Install]
WantedBy=basic.target reboot.target shutdown.target poweroff.target halt.target

before: RemainAfterExit=yes
now: RemainAfterExit=true

hmm, service doesn’t exist:

[07:35:40] root@openhab:/home/openhabian# systemctl enable zram-sync; systemctl daemon-reload
Failed to enable unit: Unit file zram-sync.service does not exist.

systemctl enable zram-sync only after step 2 of course.

ok, makes sense!

2020-08-09 08:14:47.307 [vent.ItemStateChangedEvent] - TestDateTime changed from 2020-08-07T15:10:03.000+0100 to 2020-08-09T08:14:47.292+0100

reboot

2020-08-09 08:16:51.598 [vent.ItemStateChangedEvent] - TestDateTime changed from NULL to 2020-08-07T15:10:03.000+0100

nope.

the new service didn’t run yet. Check systemctl status zram-sync then reboot

i already rebooted a second time and DateTime wasn’t restored correctly. will post status as soon as i’m home again!

2020-08-09 10:35:50.996 [vent.ItemStateChangedEvent] - TestDateTime changed from 2020-08-07T15:10:03.000+0100 to 2020-08-09T10:35:50.974+0100

[10:35:23] root@openhab:/home/openhabian# systemctl status zram-sync
● zram-sync.service - zram sync on shutdown/reboot
   Loaded: loaded (/etc/systemd/system/zram-sync.service; enabled; vendor preset: enabled)
   Active: active (exited) since Sun 2020-08-09 08:22:49 BST; 2h 12min ago
  Process: 212 ExecStart=/usr/local/bin/zram-config stop (code=exited, status=0/SUCCESS)
 Main PID: 212 (code=exited, status=0/SUCCESS)

Aug 09 08:22:48 openhab zram-config[212]: + [[ -f /boot/cmdline.txt ]]
Aug 09 08:22:48 openhab zram-config[212]: + ZEPHEMERAL=false
Aug 09 08:22:48 openhab zram-config[212]: + case "$1" in
Aug 09 08:22:48 openhab zram-config[212]: ++ date +%Y-%m-%d-%H:%M:%S
Aug 09 08:22:48 openhab zram-config[212]: + echo 'zram-config stop 2020-08-09-08:22:48'
Aug 09 08:22:48 openhab zram-config[212]: + tac /usr/local/share/zram-config/zram-device-list
Aug 09 08:22:49 openhab zram-config[212]: + file=/usr/local/share/zram-config/zram-device-list.rev
Aug 09 08:22:49 openhab zram-config[212]: + read -r line
Aug 09 08:22:49 openhab zram-config[212]: + rm -fv /usr/local/share/zram-config/zram-device-list.rev /usr/local/share/zr
Aug 09 08:22:49 openhab systemd[1]: Started zram sync on shutdown/reboot.
[10:35:30] root@openhab:/home/openhabian# reboot

2020-08-09 10:38:06.147 [vent.ItemStateChangedEvent] - TestDateTime changed from NULL to 2020-08-07T15:10:03.000+0100

hmm… also:

[10:42:41] root@openhab:/home/openhabian# systemctl status zram-config.service
● zram-config.service - zram-config
   Loaded: loaded (/etc/systemd/system/zram-config.service; enabled; vendor preset: enabled)
   Active: inactive (dead)

after another reboot zram-config is running again?

[11:03:46] root@openhab:/home/openhabian# zramctl
NAME       ALGORITHM DISKSIZE  DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram2 lzo           500M 24.9M 95.7K  468K       4 /opt/zram/zram2
/dev/zram1 lzo           500M 16.5M 17.2K  196K       4 /opt/zram/zram1
/dev/zram0 lzo           600M    4K   89B   12K       4 [SWAP]
[11:03:48] root@openhab:/home/openhabian# systemctl status zram-config.service
● zram-config.service - zram-config
   Loaded: loaded (/etc/systemd/system/zram-config.service; enabled; vendor preset: enabled)
   Active: active (exited) since Sun 2020-08-09 10:59:27 BST; 4min 29s ago
  Process: 332 ExecStartPre=/bin/rm -f /usr/local/share/zram-config/zram-device-list /usr/local/share/zram-config/zram-d
  Process: 399 ExecStart=/usr/local/bin/zram-config start (code=exited, status=0/SUCCESS)
 Main PID: 399 (code=exited, status=0/SUCCESS)

Aug 09 10:59:27 openhab zram-config[399]: + chmod 755 /opt/zram/zram2/upper /opt/zram/zram2/workdir /var/log
Aug 09 10:59:27 openhab zram-config[399]: + echo 'log                /zram2                /var/log                /log.
Aug 09 10:59:27 openhab zram-config[399]: + invoke-rc.d rsyslog start
Aug 09 10:59:27 openhab zram-config[399]: + invoke-rc.d nginx start
Aug 09 10:59:27 openhab zram-config[399]: + journalctl --flush
Aug 09 10:59:27 openhab zram-config[399]: + '[' '!' -z '' ']'
Aug 09 10:59:27 openhab zram-config[399]: + echo 'createZlog no oldlog dir in ztab'
Aug 09 10:59:27 openhab zram-config[399]: + read -r line
Aug 09 10:59:27 openhab zram-config[399]: + '[' false = true ']'
Aug 09 10:59:27 openhab systemd[1]: Started zram-config.
[11:03:58] root@openhab:/home/openhabian# systemctl status zram-sync.service
● zram-sync.service - zram sync on shutdown/reboot
   Loaded: loaded (/etc/systemd/system/zram-sync.service; enabled; vendor preset: enabled)
   Active: active (exited) since Sun 2020-08-09 10:59:25 BST; 4min 37s ago
  Process: 335 ExecStart=/usr/local/bin/zram-config stop (code=exited, status=0/SUCCESS)
 Main PID: 335 (code=exited, status=0/SUCCESS)

Aug 09 10:59:25 openhab zram-config[335]: + grep -q init=/bin/ro-root.sh /boot/cmdline.txt
Aug 09 10:59:25 openhab zram-config[335]: + ZEPHEMERAL=false
Aug 09 10:59:25 openhab zram-config[335]: + case "$1" in
Aug 09 10:59:25 openhab zram-config[335]: ++ date +%Y-%m-%d-%H:%M:%S
Aug 09 10:59:25 openhab zram-config[335]: + echo 'zram-config stop 2020-08-09-10:59:25'
Aug 09 10:59:25 openhab zram-config[335]: + tac /usr/local/share/zram-config/zram-device-list
Aug 09 10:59:25 openhab zram-config[335]: + file=/usr/local/share/zram-config/zram-device-list.rev
Aug 09 10:59:25 openhab zram-config[335]: + read -r line
Aug 09 10:59:25 openhab zram-config[335]: + rm -fv /usr/local/share/zram-config/zram-device-list.rev /usr/local/share/zr
Aug 09 10:59:25 openhab systemd[1]: Started zram sync on shutdown/reboot.

2020-08-09 11:04:31.615 [vent.ItemStateChangedEvent] - TestDateTime changed from 2020-08-07T15:10:03.000+0100 to 2020-08-09T11:04:31.605+0100
reboot

[11:08:42] root@openhab:/home/openhabian# zramctl
NAME       ALGORITHM DISKSIZE  DATA  COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram2 lzo           500M 24.9M 108.3K  504K       4 /opt/zram/zram2
/dev/zram1 lzo           500M 16.5M  17.1K  196K       4 /opt/zram/zram1
/dev/zram0 lzo           600M    4K    89B   12K       4 [SWAP]
[11:08:44] root@openhab:/home/openhabian# systemctl status zram-config.service
● zram-config.service - zram-config
   Loaded: loaded (/etc/systemd/system/zram-config.service; enabled; vendor preset: enabled)
   Active: active (exited) since Sun 2020-08-09 11:05:14 BST; 3min 39s ago
  Process: 329 ExecStartPre=/bin/rm -f /usr/local/share/zram-config/zram-device-list /usr/local/share/zram-config/zram-d
  Process: 379 ExecStart=/usr/local/bin/zram-config start (code=exited, status=0/SUCCESS)
 Main PID: 379 (code=exited, status=0/SUCCESS)

Aug 09 11:05:14 openhab zram-config[379]: + chmod 755 /opt/zram/zram2/upper /opt/zram/zram2/workdir /var/log
Aug 09 11:05:14 openhab zram-config[379]: + echo 'log                /zram2                /var/log                /log.
Aug 09 11:05:14 openhab zram-config[379]: + invoke-rc.d rsyslog start
Aug 09 11:05:14 openhab zram-config[379]: + invoke-rc.d nginx start
Aug 09 11:05:14 openhab zram-config[379]: + journalctl --flush
Aug 09 11:05:14 openhab zram-config[379]: + '[' '!' -z '' ']'
Aug 09 11:05:14 openhab zram-config[379]: + echo 'createZlog no oldlog dir in ztab'
Aug 09 11:05:14 openhab zram-config[379]: + read -r line
Aug 09 11:05:14 openhab zram-config[379]: + '[' false = true ']'
Aug 09 11:05:14 openhab systemd[1]: Started zram-config.
[11:08:55] root@openhab:/home/openhabian# systemctl status zram-sync.service
● zram-sync.service - zram sync on shutdown/reboot
   Loaded: loaded (/etc/systemd/system/zram-sync.service; enabled; vendor preset: enabled)
   Active: active (exited) since Sun 2020-08-09 11:05:12 BST; 3min 47s ago
  Process: 330 ExecStart=/usr/local/bin/zram-config stop (code=exited, status=0/SUCCESS)
 Main PID: 330 (code=exited, status=0/SUCCESS)

Aug 09 11:05:12 openhab zram-config[330]: + grep -q init=/bin/ro-root.sh /boot/cmdline.txt
Aug 09 11:05:12 openhab zram-config[330]: + ZEPHEMERAL=false
Aug 09 11:05:12 openhab zram-config[330]: + case "$1" in
Aug 09 11:05:12 openhab zram-config[330]: ++ date +%Y-%m-%d-%H:%M:%S
Aug 09 11:05:12 openhab zram-config[330]: + echo 'zram-config stop 2020-08-09-11:05:12'
Aug 09 11:05:12 openhab zram-config[330]: + tac /usr/local/share/zram-config/zram-device-list
Aug 09 11:05:12 openhab zram-config[330]: + file=/usr/local/share/zram-config/zram-device-list.rev
Aug 09 11:05:12 openhab zram-config[330]: + read -r line
Aug 09 11:05:12 openhab zram-config[330]: + rm -fv /usr/local/share/zram-config/zram-device-list.rev /usr/local/share/zr
Aug 09 11:05:12 openhab systemd[1]: Started zram sync on shutdown/reboot.

2020-08-09 11:06:20.102 [vent.ItemStateChangedEvent] - TestDateTime changed from NULL to 2020-08-09T11:04:31.000+0100

this time it worked. it seems zram doesn’t start properly on every boot… :face_with_raised_eyebrow:

zram-config reliably auto-starts on boot so you likely screwed something up.
You must remember to check every time before proceeding else we never find the cause.
This is really annoying me to debug, having to explain every simple single bit and command you need to check again and again… .that is horribly inefficient and time wasting for me when I even have to tell you to login to Github or similar stuff.

Stop using your item to validate. Create a date file in the zram dir and stick with that until that works.

Set debugmode=maximum and clonebranch=master in /etc/openhabian.conf
Start openhabian-config and double-check you use master branch
Uninstall+reinstall ZRAM from the openhabian-config menu and record the shell output
systemctl enable zram-sync
Show /etc/systemd/system/zram-config.service and zram-sync.service and their status.

i only did the things you see here and nothing else. 100%
i already mentioned here that zram-config didn’t start, and that was before i modified any files.

sorry, that’s not on purpose.

hmm, it says it’s on master, but the * is on stable:
branch

uninstall/install:

+ choice2='   | Uninstall ZRAM'
+ '[' 0 -eq 1 ']'
+ '[' 1 -eq 255 ']'
+ wait_for_apt_to_finish_update
++ timestamp
++ date +%F_%T_%Z
+ echo -n '2020-08-09_13:00:40_BST [openHABian] Updating Linux package information... '
2020-08-09_13:00:40_BST [openHABian] Updating Linux package information... + [[ -z 5552 ]]
+ tail --pid=5552 -f /dev/null
+ echo OK
OK
+ case "$choice2" in
+ init_zram_mounts uninstall
+ is_arm
+ is_armv6l
+ [[ '' == \a\r\m\v\6\l ]]
+ case "$(uname -m)" in
++ uname -m
+ return 1
+ is_armv7l
+ [[ '' == \a\r\m\v\7\l ]]
+ case "$(uname -m)" in
++ uname -m
+ return 0
+ return 0
+ local introText
+ local lowMemText
+ local zramInstallLocation
+ introText='You are about to activate the ZRAM feature.\nBe aware you do this at your own risk of data loss.\nPlease check out the "ZRAM status" thread at https://community.openhab.org/t/zram-status/80996 before proceeding.'
+ lowMemText='Your system has less than 1 GB of RAM. It is definitely NOT recommended to run ZRAM (AND openHAB) on your box. If you proceed now you will do so at your own risk!'
+ zramInstallLocation=/opt/zram
+ [[ uninstall == \i\n\s\t\a\l\l ]]
+ [[ uninstall == \u\n\i\n\s\t\a\l\l ]]
++ timestamp
++ date +%F_%T_%Z
+ echo -n '2020-08-09_13:00:40_BST [openHABian] Removing ZRAM service... '
2020-08-09_13:00:40_BST [openHABian] Removing ZRAM service... + cond_redirect systemctl stop zram-config.service zram-sync.service
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ systemctl stop zram-config.service zram-sync.service \033[39;49;00m'

$ systemctl stop zram-config.service zram-sync.service
+ systemctl stop zram-config.service zram-sync.service
+ return 0
+ cond_redirect systemctl disable zram-config.service zram-sync.service
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ systemctl disable zram-config.service zram-sync.service \033[39;49;00m'

$ systemctl disable zram-config.service zram-sync.service
+ systemctl disable zram-config.service zram-sync.service
Removed /etc/systemd/system/poweroff.target.wants/zram-sync.service.
Removed /etc/systemd/system/halt.target.wants/zram-sync.service.
Removed /etc/systemd/system/basic.target.wants/zram-config.service.
Removed /etc/systemd/system/basic.target.wants/zram-sync.service.
Removed /etc/systemd/system/reboot.target.wants/zram-sync.service.
Removed /etc/systemd/system/shutdown.target.wants/zram-sync.service.
+ return 0
+ rm -f /etc/systemd/system/zram-config.service /etc/systemd/system/zram-sync.service
+ echo OK
OK
++ timestamp
++ date +%F_%T_%Z
+ echo -n '2020-08-09_13:00:41_BST [openHABian] Removing ZRAM... '
2020-08-09_13:00:41_BST [openHABian] Removing ZRAM... + rm -f /usr/local/bin/zram-config
+ rm -f /etc/ztab
+ rm -rf /usr/local/share/zram-config
+ rm -rf /usr/local/lib/zram-config
+ rm -f /etc/logrotate.d/zram-config
+ echo OK
OK
+ '[' 0 -ne 0 ']'
+ true
+ show_main_menu
+++ get_git_revision
+++ local branch
+++ local latestTag
+++ local revCount
+++ local shorthash
++++ git -C /opt/openhabian rev-parse --abbrev-ref HEAD
+++ branch=master
++++ git -C /opt/openhabian describe --tags --abbrev=0
+++ latestTag=v1.6-alpha
++++ git -C /opt/openhabian log --oneline
++++ wc -l
+++ revCount=766
++++ git -C /opt/openhabian log --pretty=format:%h -n 1
+++ shorthash=89fc70d
+++ echo '[master]v1.6-alpha-766(89fc70d)'
++ whiptail --title 'Welcome to the openHABian Configuration Tool [master]v1.6-alpha-766(89fc70d)' --menu 'Setup Options' 20 116 13 --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' 'Upgrade all installed software packages (incl. openHAB) to their latest version' '03 | openHAB Stable' 'Install or upgrade to the latest stable release of openHAB 2' '' '' '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 ►' '' '' '60 | Manual/Fresh Setup' 'Go through all openHABian setup steps manually ►'
+ choice='30 | System Settings'
+ RET=0
+ '[' 0 -eq 1 ']'
+ '[' 0 -eq 255 ']'
+ [[ 30 | System Settings == '' ]]
+ [[ 30 | System Settings == \0\0* ]]
+ [[ 30 | System Settings == \0\1* ]]
+ [[ 30 | System Settings == \0\2* ]]
+ [[ 30 | System Settings == \0\3* ]]
+ [[ 30 | System Settings == \1\0* ]]
+ [[ 30 | System Settings == \2\0* ]]
+ [[ 30 | System Settings == \3\0* ]]
+++ get_git_revision
+++ local branch
+++ local latestTag
+++ local revCount
+++ local shorthash
++++ git -C /opt/openhabian rev-parse --abbrev-ref HEAD
+++ branch=master
++++ git -C /opt/openhabian describe --tags --abbrev=0
+++ latestTag=v1.6-alpha
++++ git -C /opt/openhabian log --oneline
++++ wc -l
+++ revCount=766
++++ git -C /opt/openhabian log --pretty=format:%h -n 1
+++ shorthash=89fc70d
+++ echo '[master]v1.6-alpha-766(89fc70d)'
+++ hostname
+++ env
+++ grep '^[[:space:]]*LANG='
+++ sed 's|LANG=||g'
+++ date +%H:%M
++ whiptail --title 'Welcome to the openHABian Configuration Tool [master]v1.6-alpha-766(89fc70d)' --menu 'Setup Options' 21 116 14 --cancel-button Back --ok-button Execute '31 | Change hostname' 'Change the name of this system, currently '\''openhab'\''' '32 | Set system locale' 'Change system language, currently '\''en_GB.UTF-8'\''' '33 | Set system timezone' 'Change the your timezone, execute if it'\''s not '\''13:00'\'' now' '   | Enable NTP' 'Enable time synchronization via systemd-timesyncd to NTP servers' '   | Disable NTP' 'Disable time synchronization via systemd-timesyncd to NTP servers' '34 | Change passwords' 'Change passwords for Samba, openHAB Console or the system user' '35 | Serial port' 'Prepare serial ports for peripherals like Razberry, SCC, Pine64 ZWave, ...' '36 | WiFi setup' 'Configure wireless network connection' '   | Disable WiFi' 'Disable wireless network connection' '37 | Move root to USB' 'Move the system root from the SD card to a USB device (SSD or stick)' '38 | Use ZRAM' 'Use compressed RAM/disk sync for active directories to avoid SD card corruption' '   | Uninstall ZRAM' 'Don'\''t use compressed memory (back to standard Raspberry Pi OS filesystem layout)' '39 | Setup VPN access' 'Setup Wireguard to enable secure remote access to openHABian (ALPHA)' '   | Remove Wireguard VPN' 'Remove Wireguard VPN from openHABian'
+ choice2='38 | Use ZRAM'
+ '[' 0 -eq 1 ']'
+ '[' 1 -eq 255 ']'
+ wait_for_apt_to_finish_update
++ timestamp
++ date +%F_%T_%Z
+ echo -n '2020-08-09_13:01:00_BST [openHABian] Updating Linux package information... '
2020-08-09_13:01:00_BST [openHABian] Updating Linux package information... + [[ -z 5552 ]]
+ tail --pid=5552 -f /dev/null
+ echo OK
OK
+ case "$choice2" in
+ init_zram_mounts install
+ is_arm
+ is_armv6l
+ [[ '' == \a\r\m\v\6\l ]]
+ case "$(uname -m)" in
++ uname -m
+ return 1
+ is_armv7l
+ [[ '' == \a\r\m\v\7\l ]]
+ case "$(uname -m)" in
++ uname -m
+ return 0
+ return 0
+ local introText
+ local lowMemText
+ local zramInstallLocation
+ introText='You are about to activate the ZRAM feature.\nBe aware you do this at your own risk of data loss.\nPlease check out the "ZRAM status" thread at https://community.openhab.org/t/zram-status/80996 before proceeding.'
+ lowMemText='Your system has less than 1 GB of RAM. It is definitely NOT recommended to run ZRAM (AND openHAB) on your box. If you proceed now you will do so at your own risk!'
+ zramInstallLocation=/opt/zram
+ [[ install == \i\n\s\t\a\l\l ]]
+ [[ -f /etc/ztab ]]
+ [[ -n 1 ]]
+ whiptail --title 'Install ZRAM, Continue?' --yes-button Continue --no-button Cancel --yesno 'You are about to activate the ZRAM feature.\nBe aware you do this at your own risk of data loss.\nPlease check out the "ZRAM status" thread at https://community.openhab.org/t/zram-status/80996 before proceeding.' 10 80
+ has_lowmem
+ local totalMemory
++ grep MemTotal /proc/meminfo
++ awk '{print $2}'
+ totalMemory=4050476
+ [[ -z 4050476 ]]
+ [[ 4050476 -lt 900000 ]]
+ return 1
+ dpkg -s make libattr1-dev
+ install_zram_code /opt/zram
+ local overlayfsGit
+ local zramGit
+ overlayfsGit=https://github.com/kmxz/overlayfs-tools
+ zramGit=https://github.com/mstormi/openhabian-zram
++ timestamp
++ date +%F_%T_%Z
+ echo -n '2020-08-09_13:01:03_BST [openHABian] Installing ZRAM code... '
2020-08-09_13:01:03_BST [openHABian] Installing ZRAM code... + cond_redirect mkdir -p /opt/zram
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ mkdir -p /opt/zram \033[39;49;00m'

$ mkdir -p /opt/zram
+ mkdir -p /opt/zram
+ return 0
+ [[ -d /opt/zram/overlayfs-tools ]]
+ cond_redirect update_git_repo /opt/zram/overlayfs-tools master
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ update_git_repo /opt/zram/overlayfs-tools master \033[39;49;00m'

$ update_git_repo /opt/zram/overlayfs-tools master
+ update_git_repo /opt/zram/overlayfs-tools master
+ local branch
+ local path
+ branch=master
+ path=/opt/zram/overlayfs-tools
++ timestamp
++ date +%F_%T_%Z
++ basename /opt/zram/overlayfs-tools
+ echo -n '2020-08-09_13:01:03_BST [openHABian] Updating overlayfs-tools, master branch from git... '
2020-08-09_13:01:03_BST [openHABian] Updating overlayfs-tools, master branch from git... + cond_redirect git -C /opt/zram/overlayfs-tools fetch origin
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ git -C /opt/zram/overlayfs-tools fetch origin \033[39;49;00m'

$ git -C /opt/zram/overlayfs-tools fetch origin
+ git -C /opt/zram/overlayfs-tools fetch origin
+ return 0
+ cond_redirect git -C /opt/zram/overlayfs-tools reset --hard origin/master
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ git -C /opt/zram/overlayfs-tools reset --hard origin/master \033[39;49;00m'

$ git -C /opt/zram/overlayfs-tools reset --hard origin/master
+ git -C /opt/zram/overlayfs-tools reset --hard origin/master
HEAD is now at 1cdf251 Fix compile on buster (#9)
+ return 0
+ cond_redirect git -C /opt/zram/overlayfs-tools clean --force -x -d
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ git -C /opt/zram/overlayfs-tools clean --force -x -d \033[39;49;00m'

$ git -C /opt/zram/overlayfs-tools clean --force -x -d
+ git -C /opt/zram/overlayfs-tools clean --force -x -d
Removing logic.o
Removing main.o
Removing overlay
Removing sh.o
+ return 0
+ cond_redirect git -C /opt/zram/overlayfs-tools checkout master
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ git -C /opt/zram/overlayfs-tools checkout master \033[39;49;00m'

$ git -C /opt/zram/overlayfs-tools checkout master
+ git -C /opt/zram/overlayfs-tools checkout master
Already on 'master'
Your branch is up to date with 'origin/master'.
+ return 0
+ echo OK
OK
+ return 0
+ [[ -d /opt/zram/openhabian-zram ]]
+ cond_redirect update_git_repo /opt/zram/openhabian-zram master
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ update_git_repo /opt/zram/openhabian-zram master \033[39;49;00m'

$ update_git_repo /opt/zram/openhabian-zram master
+ update_git_repo /opt/zram/openhabian-zram master
+ local branch
+ local path
+ branch=master
+ path=/opt/zram/openhabian-zram
++ timestamp
++ date +%F_%T_%Z
++ basename /opt/zram/openhabian-zram
+ echo -n '2020-08-09_13:01:04_BST [openHABian] Updating openhabian-zram, master branch from git... '
2020-08-09_13:01:04_BST [openHABian] Updating openhabian-zram, master branch from git... + cond_redirect git -C /opt/zram/openhabian-zram fetch origin
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ git -C /opt/zram/openhabian-zram fetch origin \033[39;49;00m'

$ git -C /opt/zram/openhabian-zram fetch origin
+ git -C /opt/zram/openhabian-zram fetch origin
+ return 0
+ cond_redirect git -C /opt/zram/openhabian-zram reset --hard origin/master
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ git -C /opt/zram/openhabian-zram reset --hard origin/master \033[39;49;00m'

$ git -C /opt/zram/openhabian-zram reset --hard origin/master
+ git -C /opt/zram/openhabian-zram reset --hard origin/master
HEAD is now at d7d0d0d add zram-sync.service to safely sync on shutdown/reboot
+ return 0
+ cond_redirect git -C /opt/zram/openhabian-zram clean --force -x -d
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ git -C /opt/zram/openhabian-zram clean --force -x -d \033[39;49;00m'

$ git -C /opt/zram/openhabian-zram clean --force -x -d
+ git -C /opt/zram/openhabian-zram clean --force -x -d
+ return 0
+ cond_redirect git -C /opt/zram/openhabian-zram checkout master
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ git -C /opt/zram/openhabian-zram checkout master \033[39;49;00m'

$ git -C /opt/zram/openhabian-zram checkout master
+ git -C /opt/zram/openhabian-zram checkout master
Already on 'master'
Your branch is up to date with 'origin/master'.
+ return 0
+ echo OK
OK
+ return 0
+ echo OK
OK
++ timestamp
++ date +%F_%T_%Z
+ echo -n '2020-08-09_13:01:05_BST [openHABian] Setting up OverlayFS... '
2020-08-09_13:01:05_BST [openHABian] Setting up OverlayFS... + cond_redirect make --always-make --directory=/opt/zram/overlayfs-tools
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ make --always-make --directory=/opt/zram/overlayfs-tools \033[39;49;00m'

$ make --always-make --directory=/opt/zram/overlayfs-tools
+ make --always-make --directory=/opt/zram/overlayfs-tools
make: Entering directory '/opt/zram/overlayfs-tools'
gcc -Wall -std=c99 -c main.c
gcc -Wall -std=c99 -c logic.c
gcc -Wall -std=c99 -c sh.c
gcc -lm main.o logic.o sh.o -o overlay
make: Leaving directory '/opt/zram/overlayfs-tools'
+ return 0
+ mkdir -p /usr/local/lib/zram-config/
+ cond_redirect install -m 755 /opt/zram/overlayfs-tools/overlay /usr/local/lib/zram-config/overlay
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ install -m 755 /opt/zram/overlayfs-tools/overlay /usr/local/lib/zram-config/overlay \033[39;49;00m'

$ install -m 755 /opt/zram/overlayfs-tools/overlay /usr/local/lib/zram-config/overlay
+ install -m 755 /opt/zram/overlayfs-tools/overlay /usr/local/lib/zram-config/overlay
+ return 0
+ echo OK
OK
++ timestamp
++ date +%F_%T_%Z
+ echo -n '2020-08-09_13:01:06_BST [openHABian] Setting up ZRAM... '
2020-08-09_13:01:06_BST [openHABian] Setting up ZRAM... + install -m 755 /opt/zram/openhabian-zram/zram-config /usr/local/bin/
+ cond_redirect install -m 644 /opt/openhabian/includes/ztab /etc/ztab
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ install -m 644 /opt/openhabian/includes/ztab /etc/ztab \033[39;49;00m'

$ install -m 644 /opt/openhabian/includes/ztab /etc/ztab
+ install -m 644 /opt/openhabian/includes/ztab /etc/ztab
+ return 0
+ mkdir -p /usr/local/share/zram-config/log
+ cond_redirect install -m 644 /opt/zram/openhabian-zram/ro-root.sh /usr/local/share/zram-config/ro-root.sh
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ install -m 644 /opt/zram/openhabian-zram/ro-root.sh /usr/local/share/zram-config/ro-root.sh \033[39;49;00m'

$ install -m 644 /opt/zram/openhabian-zram/ro-root.sh /usr/local/share/zram-config/ro-root.sh
+ install -m 644 /opt/zram/openhabian-zram/ro-root.sh /usr/local/share/zram-config/ro-root.sh
+ return 0
+ cond_redirect install -m 644 /opt/zram/openhabian-zram/zram-config.logrotate /etc/logrotate.d/zram-config
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ install -m 644 /opt/zram/openhabian-zram/zram-config.logrotate /etc/logrotate.d/zram-config \033[39;49;00m'

$ install -m 644 /opt/zram/openhabian-zram/zram-config.logrotate /etc/logrotate.d/zram-config
+ install -m 644 /opt/zram/openhabian-zram/zram-config.logrotate /etc/logrotate.d/zram-config
+ return 0
+ echo OK
OK
+ [[ -f /etc/systemd/system/find3server.service ]]
+ dpkg -s openhab2
++ timestamp
++ date +%F_%T_%Z
+ echo -n '2020-08-09_13:01:06_BST [openHABian] Setting up ZRAM service... '
2020-08-09_13:01:06_BST [openHABian] Setting up ZRAM service... + cond_redirect install -m 644 /opt/zram/openhabian-zram/zram-config.service /etc/systemd/system/zram-config.service
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ install -m 644 /opt/zram/openhabian-zram/zram-config.service /etc/systemd/system/zram-config.service \033[39;49;00m'

$ install -m 644 /opt/zram/openhabian-zram/zram-config.service /etc/systemd/system/zram-config.service
+ install -m 644 /opt/zram/openhabian-zram/zram-config.service /etc/systemd/system/zram-config.service
+ return 0
+ cond_redirect install -m 644 /opt/zram/openhabian-zram/zram-sync.service /etc/systemd/system/zram-sync.service
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ install -m 644 /opt/zram/openhabian-zram/zram-sync.service /etc/systemd/system/zram-sync.service \033[39;49;00m'

$ install -m 644 /opt/zram/openhabian-zram/zram-sync.service /etc/systemd/system/zram-sync.service
+ install -m 644 /opt/zram/openhabian-zram/zram-sync.service /etc/systemd/system/zram-sync.service
+ return 0
+ cond_redirect systemctl -q daemon-reload
+ cond_redirect systemctl enable --now zram-config.service
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ systemctl enable --now zram-config.service \033[39;49;00m'

$ systemctl enable --now zram-config.service
+ systemctl enable --now zram-config.service
Created symlink /etc/systemd/system/basic.target.wants/zram-config.service → /etc/systemd/system/zram-config.service.
+ return 0
+ cond_redirect systemctl enable --now zram-sync.service
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ systemctl enable --now zram-sync.service \033[39;49;00m'

$ systemctl enable --now zram-sync.service
+ systemctl enable --now zram-sync.service
Created symlink /etc/systemd/system/basic.target.wants/zram-sync.service → /etc/systemd/system/zram-sync.service.
Created symlink /etc/systemd/system/reboot.target.wants/zram-sync.service → /etc/systemd/system/zram-sync.service.
Created symlink /etc/systemd/system/shutdown.target.wants/zram-sync.service → /etc/systemd/system/zram-sync.service.
Created symlink /etc/systemd/system/poweroff.target.wants/zram-sync.service → /etc/systemd/system/zram-sync.service.
Created symlink /etc/systemd/system/halt.target.wants/zram-sync.service → /etc/systemd/system/zram-sync.service.
+ return 0
+ '[' 0 -ne 0 ']'
+ true
+ show_main_menu
+++ get_git_revision
+++ local branch
+++ local latestTag
+++ local revCount
+++ local shorthash
++++ git -C /opt/openhabian rev-parse --abbrev-ref HEAD
+++ branch=master
++++ git -C /opt/openhabian describe --tags --abbrev=0
+++ latestTag=v1.6-alpha
++++ git -C /opt/openhabian log --oneline
++++ wc -l
+++ revCount=766
++++ git -C /opt/openhabian log --pretty=format:%h -n 1
+++ shorthash=89fc70d
+++ echo '[master]v1.6-alpha-766(89fc70d)'
++ whiptail --title 'Welcome to the openHABian Configuration Tool [master]v1.6-alpha-766(89fc70d)' --menu 'Setup Options' 20 116 13 --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' 'Upgrade all installed software packages (incl. openHAB) to their latest version' '03 | openHAB Stable' 'Install or upgrade to the latest stable release of openHAB 2' '' '' '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 ►' '' '' '60 | Manual/Fresh Setup' 'Go through all openHABian setup steps manually ►'
+ choice=
+ RET=1
+ '[' 1 -eq 1 ']'
+ return 255
+ system_check_default_password
+ is_pi
+ is_pizero
+ [[ '' == \p\i\0 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]09[0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_pizerow
+ [[ '' == \p\i\0\w ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]0[cC][0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_pione
+ [[ '' == \p\i\1 ]]
+ grep -q '^Revision\s*:\s*00[0-9a-fA-F][0-9a-fA-F]$' /proc/cpuinfo
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]0[0-36][0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_cmone
+ [[ '' == \c\m\1 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]06[0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_pitwo
+ [[ '' == \p\i\2 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]04[0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_pithree
+ [[ '' == \p\i\3 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]08[0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_cmthree
+ [[ '' == \c\m\3 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]0[aA][0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_pithreeplus
+ [[ '' == \p\i\3\+ ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]0[dDeE][0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_cmthreeplus
+ [[ '' == \c\m\3\+ ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]10[0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ 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_pizero
+ [[ '' == \p\i\0 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]09[0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_pizerow
+ [[ '' == \p\i\0\w ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]0[cC][0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_pione
+ [[ '' == \p\i\1 ]]
+ grep -q '^Revision\s*:\s*00[0-9a-fA-F][0-9a-fA-F]$' /proc/cpuinfo
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]0[0-36][0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_cmone
+ [[ '' == \c\m\1 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]06[0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_pitwo
+ [[ '' == \p\i\2 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]04[0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_pithree
+ [[ '' == \p\i\3 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]08[0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_cmthree
+ [[ '' == \c\m\3 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]0[aA][0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_pithreeplus
+ [[ '' == \p\i\3\+ ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]0[dDeE][0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_cmthreeplus
+ [[ '' == \c\m\3\+ ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]10[0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ 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_pizero
+ [[ '' == \p\i\0 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]09[0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_pizerow
+ [[ '' == \p\i\0\w ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]0[cC][0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_pione
+ [[ '' == \p\i\1 ]]
+ grep -q '^Revision\s*:\s*00[0-9a-fA-F][0-9a-fA-F]$' /proc/cpuinfo
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]0[0-36][0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_cmone
+ [[ '' == \c\m\1 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]06[0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_pitwo
+ [[ '' == \p\i\2 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]04[0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_pithree
+ [[ '' == \p\i\3 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]08[0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_cmthree
+ [[ '' == \c\m\3 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]0[aA][0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_pithreeplus
+ [[ '' == \p\i\3\+ ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]0[dDeE][0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_cmthreeplus
+ [[ '' == \c\m\3\+ ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]10[0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ 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$wlT0kFfItLvPJQQX$QjdEl9D3PyawbGuRM4KvdVdRSlC0TCykecENKdGvoi7tafDbqUN9G6eFtfL1YngsBnQ2LmKKNOpIrmKXuO2Mk0'
++ echo '$6$wlT0kFfItLvPJQQX$QjdEl9D3PyawbGuRM4KvdVdRSlC0TCykecENKdGvoi7tafDbqUN9G6eFtfL1YngsBnQ2LmKKNOpIrmKXuO2Mk0'
++ cut '-d$' -f2
+ algo=6
+ introText='The default password was detected on your system! That is a serious security concern. Others or malicious programs in your subnet are able to gain root access!\n\nPlease set a strong password by typing the command '\''passwd'\''!'
++ echo '$6$wlT0kFfItLvPJQQX$QjdEl9D3PyawbGuRM4KvdVdRSlC0TCykecENKdGvoi7tafDbqUN9G6eFtfL1YngsBnQ2LmKKNOpIrmKXuO2Mk0'
++ cut '-d$' -f3
+ salt=wlT0kFfItLvPJQQX
+ export algo defaultPassword salt
++ perl -le 'print crypt("$ENV{defaultPassword}","\$$ENV{algo}\$$ENV{salt}\$")'
+ generatedPassword='$6$wlT0kFfItLvPJQQX$QjdEl9D3PyawbGuRM4KvdVdRSlC0TCykecENKdGvoi7tafDbqUN9G6eFtfL1YngsBnQ2LmKKNOpIrmKXuO2Mk0'
++ timestamp
++ date +%F_%T_%Z
+ echo -n '2020-08-09_13:01:18_BST [openHABian] Checking for default openHABian username:password combination... '
2020-08-09_13:01:18_BST [openHABian] Checking for default openHABian username:password combination... + id -u openhabian
+ [[ $6$wlT0kFfItLvPJQQX$QjdEl9D3PyawbGuRM4KvdVdRSlC0TCykecENKdGvoi7tafDbqUN9G6eFtfL1YngsBnQ2LmKKNOpIrmKXuO2Mk0 == \$\6\$\w\l\T\0\k\F\f\I\t\L\v\P\J\Q\Q\X\$\Q\j\d\E\l\9\D\3\P\y\a\w\b\G\u\R\M\4\K\v\d\V\d\R\S\l\C\0\T\C\y\k\e\c\E\N\K\d\G\v\o\i\7\t\a\f\D\b\q\U\N\9\G\6\e\F\t\f\L\1\Y\n\g\s\B\n\Q\2\L\m\K\K\N\O\p\I\r\m\K\X\u\O\2\M\k\0 ]]
+ [[ -n 1 ]]
+ whiptail --title 'Default Password Detected!' --msgbox 'The default password was detected on your system! That is a serious security concern. Others or malicious programs in your subnet are able to gain root access!\n\nPlease set a strong password by typing the command '\''passwd'\''!' 11 80
+ echo FAILED
FAILED
++ timestamp
++ date +%F_%T_%Z
+ echo -e '2020-08-09_13:01:20_BST [openHABian] We hope you got what you came for! See you again soon ;)'
2020-08-09_13:01:20_BST [openHABian] We hope you got what you came for! See you again soon ;)
+ cd /home/openhabian
[Unit]
Description=zram-config
After=local-fs.target
Before=reboot.target halt.target smbd.service openhab2.service
PartOf=openhab2.service

[Service]
Type=oneshot
ExecStartPre=-/bin/rm -f /usr/local/share/zram-config/zram-device-list /usr/local/share/zram-config/zram-device-list.rev
ExecStart=-/usr/local/bin/zram-config start
ExecStop=-/usr/local/bin/zram-config stop
TimeoutSec=180
RemainAfterExit=true

[Install]
WantedBy=basic.target
[Unit]
Description=zram sync on shutdown/reboot
PartOf=openhab2.service
Before=reboot.target shutdown.target poweroff.target halt.target

[Service]
Type=oneshot
ExecStart=/usr/local/bin/zram-config stop
ExecStop=/usr/local/bin/zram-config stop
TimeoutSec=0
RemainAfterExit=true

[Install]
WantedBy=basic.target reboot.target shutdown.target poweroff.target halt.target
[13:05:15] root@openhab:/home/openhabian# systemctl status zram-config.service
● zram-config.service - zram-config
   Loaded: loaded (/etc/systemd/system/zram-config.service; enabled; vendor preset: enabled)
   Active: active (exited) since Sun 2020-08-09 13:01:10 BST; 4min 12s ago
 Main PID: 6041 (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 4915)
   Memory: 0B
   CGroup: /system.slice/zram-config.service

Aug 09 13:01:10 openhab zram-config[6041]: + chmod 755 /opt/zram/zram6/upper /opt/zram/zram6/workdir /var/log
Aug 09 13:01:10 openhab zram-config[6041]: + echo 'log                /zram6                /var/log                /log
Aug 09 13:01:10 openhab zram-config[6041]: + invoke-rc.d rsyslog start
Aug 09 13:01:10 openhab zram-config[6041]: + invoke-rc.d nginx start
Aug 09 13:01:10 openhab zram-config[6041]: + journalctl --flush
Aug 09 13:01:10 openhab zram-config[6041]: + '[' '!' -z '' ']'
Aug 09 13:01:10 openhab zram-config[6041]: + echo 'createZlog no oldlog dir in ztab'
Aug 09 13:01:10 openhab zram-config[6041]: + read -r line
Aug 09 13:01:10 openhab zram-config[6041]: + '[' false = true ']'
Aug 09 13:01:10 openhab systemd[1]: Started zram-config.
[13:05:25] root@openhab:/home/openhabian# systemctl status zram-sync.service
● zram-sync.service - zram sync on shutdown/reboot
   Loaded: loaded (/etc/systemd/system/zram-sync.service; enabled; vendor preset: enabled)
   Active: active (exited) since Sun 2020-08-09 13:01:13 BST; 4min 19s ago
  Process: 6148 ExecStart=/usr/local/bin/zram-config stop (code=exited, status=0/SUCCESS)
 Main PID: 6148 (code=exited, status=0/SUCCESS)

Aug 09 13:01:13 openhab zram-config[6148]: ++ echo /zram0
Aug 09 13:01:13 openhab zram-config[6148]: ++ tr -dc 0-9
Aug 09 13:01:13 openhab zram-config[6148]: + DEV_NUM=0
Aug 09 13:01:13 openhab zram-config[6148]: + swapoff /dev/zram0
Aug 09 13:01:13 openhab zram-config[6148]: + echo 0
Aug 09 13:01:13 openhab zram-config[6148]: + /sbin/zramctl -r /dev/zram0
Aug 09 13:01:13 openhab zram-config[6148]: + echo '/dev/zram0 removed'
Aug 09 13:01:13 openhab zram-config[6148]: + read -r line
Aug 09 13:01:13 openhab zram-config[6148]: + rm -fv /usr/local/share/zram-config/zram-device-list.rev /usr/local/share/z
Aug 09 13:01:13 openhab systemd[1]: Started zram sync on shutdown/reboot.

i started with wifi (by configuring in openhabian.conf before first boot). automatic ip, didn’t change hostname.

i know, but when i re-open the menu point the “*” is back to “stable”, while stating You are currently using the very latest ("master") version of openHABian.

this seems strange:

[13:59:09] root@openhab:/home/openhabian# date|sudo tee /var/lib/openhab2/persistence/date;zramctl;reboot
Sun  9 Aug 13:59:15 BST 2020
NAME       ALGORITHM DISKSIZE  DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram6 lzo           500M 16.5M 30.3K  224K       4
/dev/zram5 lzo           500M 16.4M  9.3K  104K       4
/dev/zram4 lzo           500M 16.5M 40.4K  300K       4
/dev/zram3 lzo           500M 16.4M  9.3K   96K       4
/dev/zram2 lzo           500M 29.2M  1.7M  2.2M       4 /opt/zram/zram2
/dev/zram1 lzo           500M 16.5M 18.6K  212K       4 /opt/zram/zram1

then:

[14:03:19] root@openhab:/home/openhabian# zram
bash: zram: command not found
[14:03:25] root@openhab:/home/openhabian# zramctl
NAME       ALGORITHM DISKSIZE  DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram2 lzo           500M 16.4M 14.7K  132K       4 /opt/zram/zram2
/dev/zram1 lzo           500M 16.5M   15K  120K       4 /opt/zram/zram1
/dev/zram0 lzo           600M    4K   89B   12K       4 [SWAP]
[14:03:31] root@openhab:/home/openhabian# systemctl status zram-config.service
● zram-config.service - zram-config
   Loaded: loaded (/etc/systemd/system/zram-config.service; enabled; vendor preset: enabled)
   Active: active (exited) since Sun 2020-08-09 13:59:31 BST; 5min ago
  Process: 251 ExecStartPre=/bin/rm -f /usr/local/share/zram-config/zram-device-list /usr/local/share/zram-config/zram-d
  Process: 263 ExecStart=/usr/local/bin/zram-config start (code=exited, status=0/SUCCESS)
 Main PID: 263 (code=exited, status=0/SUCCESS)

Aug 09 13:59:31 openhab zram-config[263]: + chmod 755 /opt/zram/zram2/upper /opt/zram/zram2/workdir /var/log
Aug 09 13:59:31 openhab zram-config[263]: + echo 'log                /zram2                /var/log                /log.
Aug 09 13:59:31 openhab zram-config[263]: + invoke-rc.d rsyslog start
Aug 09 13:59:31 openhab zram-config[263]: + invoke-rc.d nginx start
Aug 09 13:59:31 openhab zram-config[263]: + journalctl --flush
Aug 09 13:59:31 openhab zram-config[263]: + '[' '!' -z '' ']'
Aug 09 13:59:31 openhab zram-config[263]: + echo 'createZlog no oldlog dir in ztab'
Aug 09 13:59:31 openhab zram-config[263]: + read -r line
Aug 09 13:59:31 openhab zram-config[263]: + '[' false = true ']'
Aug 09 13:59:31 openhab systemd[1]: Started zram-config.
[14:04:33] root@openhab:/home/openhabian# systemctl status zram-sync.service
● zram-sync.service - zram sync on shutdown/reboot
   Loaded: loaded (/etc/systemd/system/zram-sync.service; enabled; vendor preset: enabled)
   Active: active (exited) since Sun 2020-08-09 13:59:28 BST; 5min ago
  Process: 236 ExecStart=/usr/local/bin/zram-config stop (code=exited, status=0/SUCCESS)
 Main PID: 236 (code=exited, status=0/SUCCESS)

Aug 09 13:59:28 openhab zram-config[236]: + [[ -f /boot/cmdline.txt ]]
Aug 09 13:59:28 openhab zram-config[236]: + ZEPHEMERAL=false
Aug 09 13:59:28 openhab zram-config[236]: + case "$1" in
Aug 09 13:59:28 openhab zram-config[236]: ++ date +%Y-%m-%d-%H:%M:%S
Aug 09 13:59:28 openhab zram-config[236]: + echo 'zram-config stop 2020-08-09-13:59:28'
Aug 09 13:59:28 openhab zram-config[236]: + tac /usr/local/share/zram-config/zram-device-list
Aug 09 13:59:28 openhab zram-config[236]: + file=/usr/local/share/zram-config/zram-device-list.rev
Aug 09 13:59:28 openhab zram-config[236]: + read -r line
Aug 09 13:59:28 openhab zram-config[236]: + rm -fv /usr/local/share/zram-config/zram-device-list.rev /usr/local/share/zr
Aug 09 13:59:28 openhab systemd[1]: Started zram sync on shutdown/reboot.
[14:06:06] root@openhab:/home/openhabian# cat /var/lib/openhab2/persistence/date
Sun  9 Aug 13:59:15 BST 2020

edit, something’s wrong:

[14:08:31] root@openhab:/home/openhabian# systemctl status frontail.service
● frontail.service - Frontail openHAB instance, reachable at http://openhab:9001
   Loaded: loaded (/etc/systemd/system/frontail.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2020-08-09 14:01:54 BST; 34min ago
     Docs: https://github.com/mthenw/frontail
 Main PID: 902 (node)
    Tasks: 12 (limit: 4915)
   Memory: 51.0M
   CGroup: /system.slice/frontail.service
           ├─902 node /usr/lib/node_modules/frontail/bin/frontail --ui-highlight --ui-highlight-preset /usr/lib/node_mod
           └─912 tail -n 200 -F /var/log/openhab2/openhab.log /var/log/openhab2/events.log

Aug 09 14:01:54 openhab systemd[1]: Started Frontail openHAB instance, reachable at http://openhab:9001.
Aug 09 14:01:57 openhab frontail[902]: tail: cannot open '/var/log/openhab2/openhab.log' for reading: No such file or di
Aug 09 14:01:57 openhab frontail[902]: tail: cannot open '/var/log/openhab2/events.log' for reading: No such file or dir

Of course it is not on purpose Peter, no worries. Kudos for getting a test system going and trying to track down your issue :+1:

There’s some inconsistency I need to investigate first before it makes sense to do further testing. Might take a few days. In the meantime, connect your system to LAN. WiFi is no good idea anyway for a server.

1 Like

alright!

it’s only wifi with this testsystem, the other one is wired. there are no free power outlets in my rack :slight_smile:
could this really be a problem for this case? if necessary i’ll find a way to wire the testpi.

probably not but it’s never a good idea to have known difference between a prod and a test system if you want to find problems. Least thing is to make the tester aware of it!

1 Like