Changeset 10916 in hybrid
- Timestamp:
- May 19, 2012, 4:28:15 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/releng-9.0/nanobsd/files/tools/sync-etc-changes-to-cf
r10600 r10916 14 14 -v - Verbose diffs 15 15 Arguments: 16 dryrun - Check the pending changes 16 dryrun - Check the pending changes [default] 17 17 sync - Sync the pending changes 18 18 EOF … … 20 20 } 21 21 22 SYNC=false 22 23 while [ -n "$1" ]; do 23 24 case "$1" in … … 31 32 SYNC=true; shift 32 33 ;; 34 "-h") 35 usage; exit 0;; 33 36 *) 34 37 echo "Invalid Argument -- $1" … … 37 40 esac 38 41 done 39 [ -z "$SYNC" ] && usage40 42 41 trap "umount /cfg; mount -ur /" 1 2 15 EXIT 42 mount -r /cfg 43 $SYNC && mount -uwo noatime / 43 # To sync we need to now the content of /cfg 44 mount -r /cfg || exit 1 44 45 46 # Leave disks in consistent state on exit 47 trap "umount /cfg; mount -ur /" 48 trap "exit 1" 1 2 15 49 50 $SYNC && mount -uwo noatime / || exit 1 45 51 for file in `find /conf/base/etc -type f`; do 46 52 live_file=${file##/conf/base} … … 56 62 done 57 63 58 umount /cfg 59 mount -ur / 60 trap 1 2 15 EXIT 64 if ! $SYNC; then 65 echo "# Dryrun done, commit changes by calling: $0 sync" 66 fi
Note:
See TracChangeset
for help on using the changeset viewer.