summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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