Source-Changes-HG archive

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

[src/trunk]: src/sbin/devpubd/hooks Avoid error message when /dev/wedges does...



details:   https://anonhg.NetBSD.org/src/rev/c15c5f0a9bc7
branches:  trunk
changeset: 817274:c15c5f0a9bc7
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Mon Aug 15 12:54:40 2016 +0000

description:
Avoid error message when /dev/wedges doesn't exist yet.

diffstat:

 sbin/devpubd/hooks/02-wedgenames |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (20 lines):

diff -r 3bd368b404a3 -r c15c5f0a9bc7 sbin/devpubd/hooks/02-wedgenames
--- a/sbin/devpubd/hooks/02-wedgenames  Mon Aug 15 11:06:46 2016 +0000
+++ b/sbin/devpubd/hooks/02-wedgenames  Mon Aug 15 12:54:40 2016 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: 02-wedgenames,v 1.3 2015/03/01 14:21:17 mlelstv Exp $
+# $NetBSD: 02-wedgenames,v 1.4 2016/08/15 12:54:40 mlelstv Exp $
 #
 # Try to maintain symlinks to wedge devices
 #
@@ -12,7 +12,7 @@
 wedgedir=/dev/wedges
 
 remove_wedge() {
-       find $wedgedir -print \
+       test -d $wedgedir && find $wedgedir -print \
        | sed -e 's# #\\ #g' \
        | while read w; do
                t=$(readlink "$w")



Home | Main Index | Thread Index | Old Index