#!/bin/sh # This script will dump these file to whatever is the config media: # (Or rather, /dev/fd/0 for now) # - /etc/config # - /etc/firewall.init # - /etc/network.init # First: find the config media. # CONFIGDEVICE=`echo /etc/configdevice` || "/dev/fd/0" CONFIGDEVICE="/dev/fd/0" # Second: check if the config media is already mounted: # Third: mount the config media if needed mkdir /tmp/mount echo "Mounting $CONFIGDEVICE" mount -t vfat $CONFIGDEVICE /tmp/mount # Fourth; the easy part: cp -a /etc/config /tmp/mount/config cp -a /etc/network.init /tmp/mount/network.ini cp -a /etc/firewall.init /tmp/mount/firewall.ini # unmount, if it wasn't mounted