diff options
-rw-r--r-- | Makefile | 1 | ||||
-rwxr-xr-x | scripts/pm-utils | 26 |
2 files changed, 27 insertions, 0 deletions
@@ -25,6 +25,7 @@ install: install-docs scripts/wifi-menu \ $(DESTDIR)/usr/bin/ install -Dm755 scripts/ifplugd.action $(DESTDIR)/etc/ifplugd/netcfg.action + install -Dm755 scripts/pm-utils $(DESTDIR)/usr/lib/pm-utils/sleep.d/11netcfg # Daemons install -Dm755 rc.d/net-set-variable $(DESTDIR)/etc/rc.d/functions.d/net-set-variable install -m755 \ diff --git a/scripts/pm-utils b/scripts/pm-utils new file mode 100755 index 0000000..311851f --- /dev/null +++ b/scripts/pm-utils @@ -0,0 +1,26 @@ +#!/bin/bash + +. /usr/lib/pm-utils/functions + +suspend_netcfg() { + netcfg all-suspend +} + +resume_netcfg() { + netcfg all-resume +} + +if [ -x /usr/bin/netcfg ]; then + case "$1" in + hibernate|suspend) + suspend_netcfg + ;; + thaw|resume) + resume_netcfg + ;; + *) + ;; + esac +fi + +exit $? |