Module Name: src Committed By: apb Date: Wed Nov 12 19:31:05 UTC 2014
Modified Files: src/usr.sbin/postinstall: postinstall Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.181 -r1.182 src/usr.sbin/postinstall/postinstall Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.sbin/postinstall/postinstall diff -u src/usr.sbin/postinstall/postinstall:1.181 src/usr.sbin/postinstall/postinstall:1.182 --- src/usr.sbin/postinstall/postinstall:1.181 Tue Nov 11 19:41:38 2014 +++ src/usr.sbin/postinstall/postinstall Wed Nov 12 19:31:05 2014 @@ -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 @@ check_dir() 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 @@ check_ids() _op="$1" _type="$2" _file="$3" - _start="$4" - _srcfile="$5" + _srcfile="$4" + _start="$5" shift 5 #_ids="$@" @@ -1027,8 +1032,8 @@ do_gid() { [ -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 @@ do_uid() { [ -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 }