Source-Changes-HG archive

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

[src/trunk]: src/etc/rc.d Pass full pathname to df, and print warning message...



details:   https://anonhg.NetBSD.org/src/rev/b7d803c01f40
branches:  trunk
changeset: 1009921:b7d803c01f40
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Thu May 07 18:15:29 2020 +0000

description:
Pass full pathname to df, and print warning message on failure.

No need to extract dirname; `df -P /var/db/entropy-file' and `df -l
/var/db/entropy-file' work just fine.

diffstat:

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

diffs (21 lines):

diff -r 773186d7a4f6 -r b7d803c01f40 etc/rc.d/random_seed
--- a/etc/rc.d/random_seed      Thu May 07 18:13:05 2020 +0000
+++ b/etc/rc.d/random_seed      Thu May 07 18:15:29 2020 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: random_seed,v 1.10 2020/05/06 18:49:26 riastradh Exp $
+# $NetBSD: random_seed,v 1.11 2020/05/07 18:15:29 riastradh Exp $
 #
 
 # PROVIDE: random_seed
@@ -61,7 +61,8 @@
                return
        fi
 
-       if ! fs_safe "$(dirname "${random_file}")"; then
+       if ! fs_safe "${random_file}"; then
+               message "Unsafe file system for random seed ${random_file}"
                flags=-i
        fi
 



Home | Main Index | Thread Index | Old Index