blob: b39952a36eed7849dc89e212961e68c0273d1b2b (
plain)
- #!/bin/sh
- # Load settings
- set -e
- . ./defaults.cfg || exit 1
- shareddir="hosts"
- sharedfile="host"
- customfile="host.cfg"
- if [ -f "$customfile" ]; then
- if [ -f "$sharedfile" ]; then
- echo "W: Ignoring shared host config \"$sharedfile\" - using custom \"$customfile\" instead."
- fi
- . "$customfile"
- elif [ -f "$sharedfile" ]; then
- . "$shareddir"/`cat "$sharedfile" |head -1`
- else
- echo "E: No host config found - either mention shared host config in \"$sharedfile\" or write custom file \"$customfile\"."
- fi
- shareddir="targets"
- sharedfile="target"
- customfile="target.cfg"
- if [ -f "$customfile" ]; then
- if [ -f "$sharedfile" ]; then
- echo "W: Ignoring shared target config \"$sharedfile\" - using custom \"$customfile\" instead."
- fi
- . "$customfile"
- elif [ -f "$sharedfile" ]; then
- . "$shareddir"/`cat "$sharedfile" |head -1`
- else
- echo "E: No target config found - either mention shared host config in \"$sharedfile\" or write custom file \"$customfile\"."
- fi
- . ./defaults-aftermath.cfg || exit 1
|