Commit e67769a1 authored by Jussi Laakkonen's avatar Jussi Laakkonen

[connman] Home must be mounted before connmand is run. Fixes JB#46139

This forces connman to wait for /home to be mounted before it is
started. It can be achieved with RequiresMountsFor, which is equal to
having Requires and After for home.mount. Also, connman needs to be
stopped when /home is unmounted. This is achieved with PartOf.

Added a systemd service additional conf file to be put under systemd
system/connman.service.d/ which makes the above possible.
parent 86fed5c0
# This file amends the connman systemd settings by making connman to "follow"
# home mount status. RequiresMountsFor is the same as adding Requires and After
# for home.mount and ensures that connman is not started until home is mounted.
# PartOf ensures that connman is stopped before home is unmounted. This is
# because if the configurations go missing when connman is running undefined
# behavior can happen.
......@@ -7,6 +7,7 @@ License: GPLv2
Source0: %{name}-%{version}.tar.bz2
Source1: main.conf
Source2: 01-require-home-mount-to-be-present.conf
Requires: dbus >= 1.4
Requires: wpa_supplicant >= 0.7.1
Requires: ofono
......@@ -212,6 +213,9 @@ cp -a %{SOURCE1} %{buildroot}%{_sysconfdir}/connman/
mkdir -p %{buildroot}/%{_lib}/systemd/system/
ln -s ../connman.service %{buildroot}/%{_lib}/systemd/system/
mkdir -p %{buildroot}/%{_lib}/systemd/system/connman.service.d
cp -a %{SOURCE2} %{buildroot}/%{_lib}/systemd/system/connman.service.d/
mkdir -p %{buildroot}/%{_docdir}/%{name}-%{version}
install -m0644 -t %{buildroot}/%{_docdir}/%{name}-%{version} \
......@@ -263,6 +267,7 @@ systemctl daemon-reload || :
%files wait-online
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment