Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make door_daemon run again on openwrt based torwaechter #67

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

gebi
Copy link
Member

@gebi gebi commented Sep 13, 2019

debugged door_daemon on torwaechter together with @PeterTheOne and got a first version of door_daemon running, started through an init script that's able to run on torwaechter.

init script is available, properly running as tuerd (as thought?)

We've put all files into https://github.com/realraum/door_and_sensors/tree/make_door_daemon_great_again as they where initially there.

A few Questions:

  • Should those files be put into this repo?
  • What about the hotplugd files i found on torwaechter that seem to make /dev/door working and are missing in ansible?
  • How to integrate the needed files and cmds into this ansible?
  • Can i safely re-produce torwaechter from this ansible, just asking to be sure (eg. /run is missing there but is in this ansible repo)

Outcome:
door_locked: True in status.json is set when door is closed :)

@gebi gebi force-pushed the make_door_daemon_great_again branch from 0a5979e to e685d22 Compare September 15, 2019 18:24
@gebi gebi changed the title documentation of hack to make door_daemon run on openwrt based torwae… make door_daemon run again on openwrt based torwaechter Sep 15, 2019
@gebi gebi marked this pull request as ready for review September 15, 2019 18:43
@gebi
Copy link
Member Author

gebi commented Sep 15, 2019

i also patched door_door daemon to enable the security separation between different users, so users tuerctl is now able to speak to door_daemon over unix socket (all users of group tuerctl should be allowed too)

tuerctl@torwaechter:/$ /usr/local/bin/door_client
status

Status: closed closed shut

the latest commit of this PR is now running without local modifications on torwaechter :)!

@gebi
Copy link
Member Author

gebi commented Sep 15, 2019

note: I'm not so sure about porting /etc/default/door to uci config system as it would bind the complete stack rather strict to openwrt, and the config file /etc/default/door (symlinked to tuer) is used by nearly all scripts that integrated with door_daemon.

@equinox0815
Copy link
Member

equinox0815 commented Sep 18, 2019

@gebi I'm afraid you missunderstood the openwrt_mixin config. You don't need to create directories because the role will take care of the creation of all directories needed for a file. At the moment the creation of empty directories is not possible. I added a hacky fix for this issue but since this is a valid use-case we should add support for this in the openwrt/image role.

I still don't know why the openwrt_mount does not work. Actually i don't know why this has worked in the first place. Normally under OpenWRT you need the block-mount package and configure mounts in /etc/config/fstab using UCI. Probably earlier versions of OpenWRT also supported /etc/fstab and now this feature is gone...

@equinox0815
Copy link
Member

equinox0815 commented Sep 18, 2019

@nbraud what are you thoughs on the OpenWRT mounts issue? I never used it. Did this work before?

@equinox0815
Copy link
Member

note: I'm not so sure about porting /etc/default/door to uci config system as it would bind the complete stack rather strict to openwrt, and the config file /etc/default/door (symlinked to tuer) is used by nearly all scripts that integrated with door_daemon.

Actually I disagree. The current /etc/default/door thing would also be usesless on installations using systemd. On OpenWRT every configuration is done via UCI and it would make things way easier once we have support to change the OpenWRT configuration using ansible directly - aka no need to always rebuild the whole image if we just want to change one little thing...

@equinox0815
Copy link
Member

@gebi i just pushed a better fix for the empty directory issue.

@gebi
Copy link
Member Author

gebi commented Sep 25, 2019

yes, having the configuration done via UCI would be nice in the future, but i'm not sure when i have the time for that migration.

thx for the directory fix, i'll try it on the next ocasion.

@gebi
Copy link
Member Author

gebi commented Apr 14, 2021

@btittelbach did you already test your changes such that torwaechter runs the current ansible changes from this branch and only that?
if it works imho this change is good to go

@btittelbach
Copy link
Member

I checked all files and afaict current torwächter has been running with HEAD of the make_door_daemon_great_again branch for over a year now.

The only difference being, that ruru and ddd also have tuer-git access. This change is not yet in make_door_daemon_great_again but it seems it already was in master, so everything should be fine after merge.

@btittelbach
Copy link
Member

btittelbach commented Apr 16, 2021

oha... did "not changing anything" or "reverting a chagne" or the "removal of users from the yaml file, by reverting a change" confuse the vault script?
Looks like an error in the CI, so branch should be good to go.

@gebi
Copy link
Member Author

gebi commented Jul 13, 2021

@equinox0815 @nbraud can this branch be merged? torwaechter is running with HEAD of this branch since 1.5 years.

@gebi gebi force-pushed the make_door_daemon_great_again branch from a3d5e25 to 059b837 Compare July 13, 2021 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants