/apm/resume.d/80ifplugd
http://github.com/brinkman83/bashrc · Shell · 22 lines · 16 code · 4 blank · 2 comment · 8 complexity · 7d5c0b8bf9d49cb9d3735e10640f5d38 MD5 · raw file
- #!/bin/sh
- # suspend ifplugd
- [ -f /etc/default/ifplugd ] || exit 0
- . /etc/default/ifplugd
- [ "$SUSPEND_ACTION" ] || [ "$SUSPEND_ACTION" != "none" ] || exit 0
- if [ "$SUSPEND_ACTION" = "suspend" ] ; then
- RESUME_ACTION="resume"
- elif [ "$SUSPEND_ACTION" = "stop" ] ; then
- RESUME_ACTION="start"
- else
- exit 0
- fi
- if [ "$1" = suspend ]; then
- /etc/init.d/ifplugd ${SUSPEND_ACTION}
- elif [ "$1" = resume ] && [ "$2" != standby ]; then
- /etc/init.d/ifplugd ${RESUME_ACTION}
- fi
- exit 0