OpenHAB 3.1 successful, but openhabian (Putty) always starts in 2.5.12-1

I’ve sucessfully updated to openhab 3.1 but whenever I fire up openhabian in putty the logo screen shows I’m still running 2.5.12-1


Have a look to the .bash_profile of the openhabian user. Does it contain these lines ?

if openhab3_is_installed; then OHPKG="openhab"; else OHPKG="openhab2"; fi

OHVERSION="$(sed -n 's/openhab-distro\s*: //p' /var/lib/${OHPKG}/etc/"
OHBUILD="$(sed -n 's/build-no\s*: //p' /var/lib/${OHPKG}/etc/"

echo -e "\\n$(sed -e 's|$OHVERSION|'"${OHVERSION}"'|g' -e 's|$OHBUILD|'"${OHBUILD}"'|g' -e 's|${HOSTNAME}|'"${HOSTNAME}"'|g' /opt/openhabian/includes/${OHPKG}logo)\\n"

As you can see depending on the installed version different paths are used to get the OHVERSION/OHBUILD. I assume that yours look into the wrong path.


The question is: how was the update done? Using openhabian-config menu or what?

1 Like

at least the openhabian user’s .bash_profile is not up-to-date.
This indeed could mean that the update was done via apt and not openhabian-config.

The update was done using the sudo openhabian-config via Putty option #3.

I’m not an expert user, where do I find the bash_profile?

The file is located at: /home/openhabian/.bash_profile
You can have a look to the content by using

more /home/openhabian/.bash_profile

when you are logged in as user openhabian. With space-bar you can have a look to the next page.

You also can do

grep OHPKG /home/openhabian/.bash_profile

which will show lines that contain OHPKG. The output should give an indication if the above rows are included or not.

These are my results

Sorry to say but screenshots are not that easy to read like text that is copied into code fences.
This is an older version of the .bash_profile that was created by openhabian-config.
Either you need to get a newer one or remove the 2 in openhab2 string in the row that contains the string “dpkg-query --showformat=’${Version}’ --show openhab2”.

diff /opt/openhabian/includes/generic/bash_profile ~/.bash_profile
cp /opt/openhabian/includes/generic/bash_profile ~/.bash_profile

This however is sign that something went wrong along the upgrade way so if you encounter more and more severe issues you should consider reinstalling.

I removed the “2” and that seems to have “fixed it”. Although I still don’t know the root cause of the trouble and worry that maybe it was a bad upgrade. I will look to see if any more anomalies pop up. Thank you for the help.

Is it normal that the folder structure still shows openHAB2-conf? and not just openHAB-conf


That also should be migrated.
Which menu entry did you use to migrate from openhab2 to openhab ?
03 or 42 ?
As far as I understand 03 upgrades openhab while 42 upgrades openhabian which means also the samba configuration.