modemmanager: move iface cleanup to wrapper script
If the ModemManager process crashes, the interfaces are not cleaned up properly because the stop_service method is not called. With this change, the interfaces are cleaned up both when stopping the service and during a crash. Therefore it is no longer necessary to perform a cleanup at the beginning. Signed-off-by: Oliver Sedlbauer <osedlbauer@tdt.de>
This commit is contained in:
parent
d78505bcfa
commit
074741e343
3 changed files with 4 additions and 9 deletions
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=modemmanager
|
PKG_NAME:=modemmanager
|
||||||
PKG_SOURCE_VERSION:=1.22.0
|
PKG_SOURCE_VERSION:=1.22.0
|
||||||
PKG_RELEASE:=4
|
PKG_RELEASE:=5
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL:=https://gitlab.freedesktop.org/mobile-broadband/ModemManager.git
|
PKG_SOURCE_URL:=https://gitlab.freedesktop.org/mobile-broadband/ModemManager.git
|
||||||
|
|
|
@ -6,13 +6,6 @@ START=70
|
||||||
|
|
||||||
LOG_LEVEL="INFO"
|
LOG_LEVEL="INFO"
|
||||||
|
|
||||||
stop_service() {
|
|
||||||
# Load common utils
|
|
||||||
. /usr/share/ModemManager/modemmanager.common
|
|
||||||
# Set all configured interfaces as unavailable
|
|
||||||
mm_cleanup_interfaces
|
|
||||||
}
|
|
||||||
|
|
||||||
start_service() {
|
start_service() {
|
||||||
# Setup ModemManager service
|
# Setup ModemManager service
|
||||||
#
|
#
|
||||||
|
|
|
@ -20,7 +20,6 @@ main() {
|
||||||
|
|
||||||
mkdir -p "${MODEMMANAGER_RUNDIR}"
|
mkdir -p "${MODEMMANAGER_RUNDIR}"
|
||||||
chmod 0755 "${MODEMMANAGER_RUNDIR}"
|
chmod 0755 "${MODEMMANAGER_RUNDIR}"
|
||||||
mm_cleanup_interfaces
|
|
||||||
|
|
||||||
/usr/sbin/ModemManager "$@" 1>/dev/null 2>/dev/null &
|
/usr/sbin/ModemManager "$@" 1>/dev/null 2>/dev/null &
|
||||||
CHILD="$!"
|
CHILD="$!"
|
||||||
|
@ -28,6 +27,9 @@ main() {
|
||||||
mm_report_events_from_cache
|
mm_report_events_from_cache
|
||||||
|
|
||||||
wait "$CHILD"
|
wait "$CHILD"
|
||||||
|
|
||||||
|
# Set all configured interfaces as unavailable
|
||||||
|
mm_cleanup_interfaces
|
||||||
}
|
}
|
||||||
|
|
||||||
main "$@"
|
main "$@"
|
||||||
|
|
Loading…
Reference in a new issue