1254721Semaste#!/bin/sh 2254721Semaste# 3353358Sdim# Copyright (c) 2006 Mathieu Arnold 4353358Sdim# All rights reserved. 5353358Sdim# 6254721Semaste# Redistribution and use in source and binary forms, with or without 7254721Semaste# modification, are permitted provided that the following conditions 8254721Semaste# are met: 9254721Semaste# 1. Redistributions of source code must retain the above copyright 10254721Semaste# notice, this list of conditions and the following disclaimer. 11254721Semaste# 2. Redistributions in binary form must reproduce the above copyright 12258054Semaste# notice, this list of conditions and the following disclaimer in the 13254721Semaste# documentation and/or other materials provided with the distribution. 14254721Semaste# 15254721Semaste# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16314564Sdim# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17254721Semaste# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18254721Semaste# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19344779Sdim# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20344779Sdim# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21344779Sdim# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22254721Semaste# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23344779Sdim# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24344779Sdim# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25344779Sdim# SUCH DAMAGE. 26344779Sdim# 27314564Sdim# $FreeBSD$ 28254721Semaste# 29353358Sdim 30314564Sdimset -e 31314564Sdim 32314564Sdimtrap "umount /cfg" 1 2 15 EXIT 33353358Sdimmount /cfg 34280031Sdim( 35314564Sdimcd /cfg 36254721Semastefor i in "$@" `find * -type f` 37314564Sdimdo 38254721Semaste cmp -s /etc/$i /cfg/$i || cp -pfv /etc/$i /cfg/$i 39341825Sdimdone 40341825Sdim) 41353358Sdimumount /cfg 42341825Sdimtrap 1 2 15 EXIT 43254721Semaste