NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: PR/38103 CVS commit: src/etc/rc.d

Hi again,

perhaps our patch to the startupfile may be usefull for other people too ..

It will start a gracefull shutdown.
If some amd root mountpoints will remain, they get unmounted by force.
The amd is killed by SIGQUIT by the normal stop processing of the rc-file processing.

It works fine for us without any problems (up to now).
remark: the "real" NFS-mounts are not unmounted, because I'm not shure if that would be a good idea.

W. Stukenbrock

The follwoing patch is based on version 1.14 of /etc/rc.d/amd - so the
line "# KEYWORD: shutdown" ist still in there!
We maintain an own patch-pase for the releases, so the rcs-diff-version is based on 1.1. Don't get confused by this.

--- amd 2008/02/26 10:26:54     1.1
+++ amd 2008/02/26 10:40:46
@@ -15,6 +15,27 @@
 reload_cmd="/usr/sbin/amq -f"
+gracefull_stop ()
+  if [ -n "$rc_pid" ]; then
+ echo "starting gracefull shutdown of $name ($rc_pid) ... delay $delay_time seconds ..."
+    kill -TERM $rc_pid
+    sleep $delay_time
+    for p in $rc_pid; do
+ still_mounted="`mount | sed -n -e '/^pid'$p'@/s/^.* on \/\([^ ]*\) .*$/\/\1/p'`"
+      if [ -n "$still_mounted" ]; then
+ echo "force unmount of remaining $name ($p) mountpoints" $still_mounted
+       for m in $still_mounted; do umount -f $m; done
+      fi
+    done
+  fi
+  return 0

 load_rc_config $name

Matthias Scheler wrote:

The following reply was made to PR bin/38103; it has been noted by GNATS.

From: Matthias Scheler <>
Cc: Subject: PR/38103 CVS commit: src/etc/rc.d
Date: Mon, 25 Feb 2008 22:12:42 +0000 (UTC)

 Module Name:   src
 Committed By:  tron
 Date:          Mon Feb 25 22:12:42 UTC 2008
Modified Files:
        src/etc/rc.d: amd
Log Message:
 Don't try to shutdown amd(8) gracefully. It seems to cause problems for
 more people than the old (also broken) behavior. This fixes PR bin/36506
 and PR bin/38103.
To generate a diff of this commit:
 cvs rdiff -r1.14 -r1.15 src/etc/rc.d/amd
Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Home | Main Index | Thread Index | Old Index