114a012c5Schristos#! /bin/sh 214a012c5Schristos# 3*201780c4Schristos# $NetBSD: openpam2netbsd,v 1.3 2014/10/24 18:17:55 christos Exp $ 414a012c5Schristos# 514a012c5Schristos# Copyright (c) 2011 The NetBSD Foundation, Inc. 614a012c5Schristos# All rights reserved. 714a012c5Schristos# 814a012c5Schristos# Redistribution and use in source and binary forms, with or without 914a012c5Schristos# modification, are permitted provided that the following conditions 1014a012c5Schristos# are met: 1114a012c5Schristos# 1. Redistributions of source code must retain the above copyright 1214a012c5Schristos# notice, this list of conditions and the following disclaimer. 1314a012c5Schristos# 2. Redistributions in binary form must reproduce the above copyright 1414a012c5Schristos# notice, this list of conditions and the following disclaimer in the 1514a012c5Schristos# documentation and/or other materials provided with the distribution. 1614a012c5Schristos# 1714a012c5Schristos# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 1814a012c5Schristos# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 1914a012c5Schristos# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 2014a012c5Schristos# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 2114a012c5Schristos# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2214a012c5Schristos# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 2314a012c5Schristos# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 2414a012c5Schristos# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 2514a012c5Schristos# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 2614a012c5Schristos# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 2714a012c5Schristos# POSSIBILITY OF SUCH DAMAGE. 2814a012c5Schristos# 2914a012c5Schristos# openpam2netbsd: convert an openpam source tree into a 3014a012c5Schristos# netbsd openp source tree, under src/dist, 3114a012c5Schristos# 3214a012c5Schristos# Rough instructions for importing new openp release: 3314a012c5Schristos# 3414a012c5Schristos# $ cd /some/where/temporary 3514a012c5Schristos# $ tar xpfz /new/openpam/release/tar/file 3614a012c5Schristos# $ sh /usr/src/external/bsd/openpam/openp2netbsd openpam-YYYYMMDD 3714a012c5Schristos# $ cd openpam-YYYYMMDD 3814a012c5Schristos# $ cvs -d cvs.netbsd.org:/cvsroot import -m "Import openpam-YYYYMMDD" src/external/bsd/openpam/dist OPENPAM flower-YYYYMMDD 3914a012c5Schristos# - check makefiles to see if any extra sources have been added. 4014a012c5Schristos# - update distrib/sets if necessary. 4114a012c5Schristos 4214a012c5Schristosif [ $# -ne 1 ]; then echo "openp2netbsd src"; exit 1; fi 4314a012c5Schristos 4414a012c5Schristosr=$1 4514a012c5Schristoscase "$r" in 4614a012c5Schristos /*) 4714a012c5Schristos ;; 4814a012c5Schristos *) 4914a012c5Schristos r=`/bin/pwd`/$r 5014a012c5Schristos ;; 5114a012c5Schristosesac 5214a012c5Schristos 5314a012c5Schristoscd $r 5414a012c5Schristos 5514a012c5Schristos### Remove the $'s around RCS tags 5614a012c5Schristoscleantags $r 5714a012c5Schristos 5814a012c5Schristos### Clean up any CVS directories that might be around. 5914a012c5Schristosecho "cleaning up CVS residue." 6014a012c5Schristosfind $r -type d -name "CVS" -print | xargs rm -r 6114a012c5Schristosecho done 6214a012c5Schristos 6314a012c5Schristos### Fixing file and directory permissions. 6414a012c5Schristosecho "Fixing file/directory permissions." 6514a012c5Schristos( 6614a012c5Schristos find $r -type f -print | xargs chmod u+rw,go+r 6714a012c5Schristos find $r -type d -print | xargs chmod u+rwx,go+rx 6814a012c5Schristos) 6914a012c5Schristosecho done 7014a012c5Schristos 7114a012c5Schristosexit 0 72