standby: homogenize standby script across all platforms
* Use the same operation order when resuming interfaces * Remove unnecessary delay in ccimx6sbc standby script Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
This commit is contained in:
parent
c1fd7e473c
commit
f1ce4bfbc8
|
|
@ -3,7 +3,7 @@
|
||||||
#
|
#
|
||||||
# standby
|
# standby
|
||||||
#
|
#
|
||||||
# Copyright (C) 2017,2018 by Digi International Inc.
|
# Copyright (C) 2017-2019 by Digi International Inc.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify it
|
# This program is free software; you can redistribute it and/or modify it
|
||||||
|
|
@ -64,9 +64,6 @@ resume_interfaces() {
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Resume NetworkManager after suspend
|
|
||||||
${NM_DAEMON} start
|
|
||||||
|
|
||||||
# Resume bluetooth interface
|
# Resume bluetooth interface
|
||||||
if [ -d "/proc/device-tree/bluetooth" ]; then
|
if [ -d "/proc/device-tree/bluetooth" ]; then
|
||||||
if [ -n "${up_bt_on_resume}" ]; then
|
if [ -n "${up_bt_on_resume}" ]; then
|
||||||
|
|
@ -74,6 +71,9 @@ resume_interfaces() {
|
||||||
${BT_DAEMON} start >/dev/null
|
${BT_DAEMON} start >/dev/null
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Resume NetworkManager after suspend
|
||||||
|
${NM_DAEMON} start
|
||||||
}
|
}
|
||||||
|
|
||||||
enter_critical_section() {
|
enter_critical_section() {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
#
|
#
|
||||||
# standby
|
# standby
|
||||||
#
|
#
|
||||||
# Copyright (C) 2009-2018 by Digi International Inc.
|
# Copyright (C) 2009-2019 by Digi International Inc.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify it
|
# This program is free software; you can redistribute it and/or modify it
|
||||||
|
|
@ -106,7 +106,6 @@ if [ -f "${syspower}" ]; then
|
||||||
|
|
||||||
# Suspend the device
|
# Suspend the device
|
||||||
printf "mem" > ${syspower}
|
printf "mem" > ${syspower}
|
||||||
sleep .5
|
|
||||||
|
|
||||||
# Post-resume actions
|
# Post-resume actions
|
||||||
resume_interfaces
|
resume_interfaces
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
#
|
#
|
||||||
# standby
|
# standby
|
||||||
#
|
#
|
||||||
# Copyright (C) 2018 by Digi International Inc.
|
# Copyright (C) 2018,2019 by Digi International Inc.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify it
|
# This program is free software; you can redistribute it and/or modify it
|
||||||
|
|
@ -64,9 +64,6 @@ resume_interfaces() {
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Resume NetworkManager after suspend
|
|
||||||
${NM_DAEMON} start
|
|
||||||
|
|
||||||
# Resume bluetooth interface
|
# Resume bluetooth interface
|
||||||
if [ -d "/proc/device-tree/bluetooth" ]; then
|
if [ -d "/proc/device-tree/bluetooth" ]; then
|
||||||
if [ -n "${up_bt_on_resume}" ]; then
|
if [ -n "${up_bt_on_resume}" ]; then
|
||||||
|
|
@ -74,6 +71,9 @@ resume_interfaces() {
|
||||||
${BT_DAEMON} start >/dev/null
|
${BT_DAEMON} start >/dev/null
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Resume NetworkManager after suspend
|
||||||
|
${NM_DAEMON} start
|
||||||
}
|
}
|
||||||
|
|
||||||
enter_critical_section() {
|
enter_critical_section() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue