[Pm-utils] [PATCH 09/12] Proposed pm-utils 1.2.3 patches, take 2
Victor Lowther
victor.lowther at gmail.com
Sun Nov 30 16:33:21 PST 2008
Drop 50ntpd
ntpd operates normally over a sleep/wake cycle. Stoppping and
restarting it in a sleep hook is too adhoc. If it is essential
that ntpd be stopped and restarted, then having NetworkManager
do the job when interfaces go offline and come back online is
a better way to do things.
---
pm/sleep.d/50ntpd | 28 ----------------------------
1 files changed, 0 insertions(+), 28 deletions(-)
diff --git a/pm/sleep.d/50ntpd b/pm/sleep.d/50ntpd
deleted file mode 100755
index 96ad3d4..0000000
--- a/pm/sleep.d/50ntpd
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-
-. "${PM_FUNCTIONS}"
-
-NTPD_LOCK="pm-ntpd.lock"
-
-stop_ntp()
-{
- if try_lock "${NTPD_LOCK}"; then
- trap 'release_lock "${NTPD_LOCK}"' 0
- stopservice ntpd
- fi
-}
-
-start_ntp()
-{
- # Bring back ntpd _after_ NetworkManager and such come back...
- ( spin_lock "${NTPD_LOCK}";
- trap 'release_lock "${NTPD_LOCK}"' 0
- sleep 20
- restartservice ntpd; ) &
-}
-
-case "$1" in
- hibernate|suspend) stop_ntp ;;
- thaw|resume) start_ntp ;;
- *) exit $NA ;;
-esac
--
1.6.0.4
More information about the Pm-utils
mailing list