Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/etcupdate Checksum files produced by "etcupdate -a"...



details:   https://anonhg.NetBSD.org/src/rev/35f6fe1a75c6
branches:  trunk
changeset: 543751:35f6fe1a75c6
user:      martti <martti%NetBSD.org@localhost>
date:      Mon Mar 03 14:07:11 2003 +0000

description:
Checksum files produced by "etcupdate -a" should not be stored in /etc
as / might be a read-only filesystem (PR#20201).

diffstat:

 usr.sbin/etcupdate/etcupdate   |  10 +++++-----
 usr.sbin/etcupdate/etcupdate.8 |   4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

diffs (52 lines):

diff -r 4e4398ba7888 -r 35f6fe1a75c6 usr.sbin/etcupdate/etcupdate
--- a/usr.sbin/etcupdate/etcupdate      Mon Mar 03 13:58:24 2003 +0000
+++ b/usr.sbin/etcupdate/etcupdate      Mon Mar 03 14:07:11 2003 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: etcupdate,v 1.11 2003/03/01 12:59:54 mrg Exp $
+# $NetBSD: etcupdate,v 1.12 2003/03/03 14:07:11 martti Exp $
 #
 # Copyright (c) 2001 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -149,8 +149,8 @@
        [ "${AUTOMATIC}" != "YES" ] && return
 
        D=`dirname "${1}"`
-       mkdir -p "/etc/etcupdate/${D}"
-       md5 "${1}" > "/etc/etcupdate/${1}"
+       mkdir -p "/var/etcupdate/${D}"
+       md5 "${1}" > "/var/etcupdate/${1}"
 }
 
 diff_and_merge_file() {
@@ -163,9 +163,9 @@
                return
        fi
 
-       if [ "${AUTOMATIC}" = "YES" -a -f "/etc/etcupdate/${1}"  ] ; then
+       if [ "${AUTOMATIC}" = "YES" -a -f "/var/etcupdate/${1}"  ] ; then
                SUM1=`md5 "${1}"`
-               SUM2=`cat "/etc/etcupdate/${1}"`
+               SUM2=`cat "/var/etcupdate/${1}"`
                if [ "${SUM1}" = "${SUM2}" ] ; then
                        install_file "${1}"
                        install_checksum "${1}"
diff -r 4e4398ba7888 -r 35f6fe1a75c6 usr.sbin/etcupdate/etcupdate.8
--- a/usr.sbin/etcupdate/etcupdate.8    Mon Mar 03 13:58:24 2003 +0000
+++ b/usr.sbin/etcupdate/etcupdate.8    Mon Mar 03 14:07:11 2003 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: etcupdate.8,v 1.5 2003/03/01 12:59:55 mrg Exp $
+.\"    $NetBSD: etcupdate.8,v 1.6 2003/03/03 14:07:12 martti Exp $
 .\"
 .\" Copyright (c) 2001 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -111,7 +111,7 @@
 flag instructs
 .Nm
 to store MD5 checksums in
-.Pa /etc/etcupdate
+.Pa /var/etcupdate
 and use these checksums to determine if there have been any
 local modifications.
 .Sh ENVIRONMENT



Home | Main Index | Thread Index | Old Index