summaryrefslogtreecommitdiffstats
path: root/etc/rc.initial.store_config_to_removable_device
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-11-25 21:34:27 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-11-25 21:34:27 +0000
commit4172a44d36364901d414bce85eb0589e6b9be0d9 (patch)
tree05c10ede6050bd6183816c18ec74c2cc1d13d364 /etc/rc.initial.store_config_to_removable_device
parent171966c9ebc97f823161929a417a77f90f3f9cfa (diff)
downloadpfsense-4172a44d36364901d414bce85eb0589e6b9be0d9.zip
pfsense-4172a44d36364901d414bce85eb0589e6b9be0d9.tar.gz
* Store configuration in /tmp/mnt/cf/conf
* Use null_fs to mount areas up
Diffstat (limited to 'etc/rc.initial.store_config_to_removable_device')
-rwxr-xr-xetc/rc.initial.store_config_to_removable_device14
1 files changed, 7 insertions, 7 deletions
diff --git a/etc/rc.initial.store_config_to_removable_device b/etc/rc.initial.store_config_to_removable_device
index 259d0b1..206c112 100755
--- a/etc/rc.initial.store_config_to_removable_device
+++ b/etc/rc.initial.store_config_to_removable_device
@@ -69,17 +69,17 @@
echo "\n\nProcessing: ";
config_lock();
echo "moving...";
- mwexec("/bin/mv /cf/conf/config.xml /tmp/mnt/cf/");
+ mwexec("mkdir -p /tmp/mnt/cf/conf/");
+ mwexec("/bin/mv /cf/conf/config.xml /tmp/mnt/cf/conf/");
echo "removing old...";
echo " nullfs... ";
system("/sbin/umount /cf/conf");
- //system("/sbin/umount /conf");
- //mwexec("/bin/rm -rf /conf");
- mwexec("/bin/rm -rf /cf");
- mwexec("/bin/mkdir /cf/");
+ system("/sbin/umount /conf");
+ mwexec("/bin/rm -rf /conf/*.*");
+ /* use nullfs to mount */
+ system("/sbin/mount_nullfs /tmp/mnt/cf/conf /conf");
+ system("/sbin/mount_nullfs /tmp/mnt/cf /cf");
echo "linking...";
- mwexec("/bin/ln -s /tmp/mnt/cf /cf/conf");
- mwexec("/bin/ln -s /tmp/mnt/cf /conf");
mwexec("/bin/rm -rf /var/db/pfi");
config_unlock();
echo "done.\n";
OpenPOWER on IntegriCloud