Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/postinstall Change the order of arguments to check_...



details:   https://anonhg.NetBSD.org/src/rev/2e6f519b43d0
branches:  trunk
changeset: 803799:2e6f519b43d0
user:      apb <apb%NetBSD.org@localhost>
date:      Wed Nov 12 19:31:05 2014 +0000

description:
Change the order of arguments to check_ids, placing the two file names
adjacent to each other.  Also add a comment explaining the "start"
argument and the "SKIP" special value.

diffstat:

 usr.sbin/postinstall/postinstall |  23 ++++++++++++++---------
 1 files changed, 14 insertions(+), 9 deletions(-)

diffs (60 lines):

diff -r d4ae665c5bf6 -r 2e6f519b43d0 usr.sbin/postinstall/postinstall
--- a/usr.sbin/postinstall/postinstall  Wed Nov 12 17:38:56 2014 +0000
+++ b/usr.sbin/postinstall/postinstall  Wed Nov 12 19:31:05 2014 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: postinstall,v 1.181 2014/11/11 19:41:38 martin Exp $
+# $NetBSD: postinstall,v 1.182 2014/11/12 19:31:05 apb Exp $
 #
 # Copyright (c) 2002-2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -223,8 +223,13 @@
        return 0
 }
 
-# check_ids op type file start id [...]
-#      Check if file of type "users" or "groups" contains the relevant IDs
+# check_ids op type file srcfile start id [...]
+#      Check if file of type "users" or "groups" contains the relevant IDs.
+#      Use srcfile as a reference for the expected contents.
+#       The specified "id" names should be given in numerical order,
+#      with the first name corresponding to numerical value "start",
+#      and with the special name "SKIP" being used to mark gaps in the
+#      sequence.
 #      Returns 0 if ok, 1 otherwise.
 #      
 check_ids()
@@ -233,8 +238,8 @@
        _op="$1"
        _type="$2"
        _file="$3"
-       _start="$4"
-       _srcfile="$5"
+       _srcfile="$4"
+       _start="$5"
        shift 5
        #_ids="$@"
 
@@ -1027,8 +1032,8 @@
 {
        [ -n "$1" ] || err 3 "USAGE: do_gid  fix|check"
 
-       check_ids "$1" groups "${DEST_DIR}/etc/group" 14 \
-           "${SRC_DIR}/etc/group" \
+       check_ids "$1" groups "${DEST_DIR}/etc/group" \
+           "${SRC_DIR}/etc/group" 14 \
            named ntpd sshd SKIP _pflogd _rwhod staff _proxy _timedc \
            _sdpd _httpd _mdnsd _tests _tcpdump _tss _gpio _rtadvd
 }
@@ -1706,8 +1711,8 @@
 {
        [ -n "$1" ] || err 3 "USAGE: do_uid  fix|check"
 
-       check_ids "$1" users "${DEST_DIR}/etc/master.passwd" 12 \
-           "${SRC_DIR}/etc/master.passwd" \
+       check_ids "$1" users "${DEST_DIR}/etc/master.passwd" \
+           "${SRC_DIR}/etc/master.passwd" 12 \
            postfix SKIP named ntpd sshd SKIP _pflogd _rwhod SKIP _proxy \
            _timedc _sdpd _httpd _mdnsd _tests _tcpdump _tss SKIP _rtadvd
 }



Home | Main Index | Thread Index | Old Index