Source-Changes-HG archive

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

[src/trunk]: src/etc/rc.d Reinstate the dirname invocations that were recentl...



details:   https://anonhg.NetBSD.org/src/rev/4e3a6bcd0928
branches:  trunk
changeset: 783377:4e3a6bcd0928
user:      apb <apb%NetBSD.org@localhost>
date:      Mon Dec 17 18:20:50 2012 +0000

description:
Reinstate the dirname invocations that were recently removed from
rc.d/random_seed.  The new dirname shell function provided by rc.subr
will be used, so it should work before the /usr file system is mounted.

This should fix a problem in which the fs_safe shell function failed when
passed the name of a file that did not exist.

diffstat:

 etc/rc.d/random_seed |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r 85bfee60d3dd -r 4e3a6bcd0928 etc/rc.d/random_seed
--- a/etc/rc.d/random_seed      Mon Dec 17 18:17:27 2012 +0000
+++ b/etc/rc.d/random_seed      Mon Dec 17 18:20:50 2012 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: random_seed,v 1.4 2012/12/14 18:42:25 apb Exp $
+# $NetBSD: random_seed,v 1.5 2012/12/17 18:20:50 apb Exp $
 #
 
 # PROVIDE: random_seed
@@ -59,7 +59,7 @@
 {
        if [ -f $random_file ]; then
 
-               if ! fs_safe "${random_file}"; then
+               if ! fs_safe "$(dirname "${random_file}")"; then
                        return 1
                fi
 
@@ -90,7 +90,7 @@
 
        rm -Pf "${random_file}"
 
-       if ! fs_safe "${random_file}"; then
+       if ! fs_safe "$(dirname "${random_file}")"; then
                return 1
        fi
 



Home | Main Index | Thread Index | Old Index