[Zrouter-src] ZRouter.org: push to ZRouter profiles/SMALL_/files/etc/save_etc
zrouter-src at zrouter.org
zrouter-src at zrouter.org
Tue Jan 31 07:24:40 UTC 2012
details: http://zrouter.org/hg/zrouter//rev/38126f7ab1d7
changeset: 333:38126f7ab1d7
user: ray at terran.dlink.ua
date: Tue Jan 31 09:25:02 2012 +0200
description:
Autoprobe which device to use: map/config or redboot/config
diffstat:
profiles/SMALL_/files/etc/save_etc | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diffs (30 lines):
diff -r 18e08002dd6e -r 38126f7ab1d7 profiles/SMALL_/files/etc/save_etc
--- a/profiles/SMALL_/files/etc/save_etc Fri Jan 27 11:04:32 2012 +0200
+++ b/profiles/SMALL_/files/etc/save_etc Tue Jan 31 09:25:02 2012 +0200
@@ -1,6 +1,16 @@
#!/bin/sh
-DEVCONFIG=/dev/map/config
+if [ -c /dev/map/config ]; then
+ DEVCONFIG=/dev/map/config
+fi
+if [ -c /dev/redboot/config ]; then
+ DEVCONFIG=/dev/reboot/config
+fi
+if [ "x${DEVCONFIG}" == "x" ]; then
+ echo "No config partiton found";
+ exit 1;
+fi
+
BLOCK_SIZE=64
GEOM_PART=`echo ${DEVCONFIG} | sed 's/\/dev\///; s!\/!\\\/!' `
@@ -30,7 +40,7 @@
echo "Saving /etc"
sysctl hw.cfi.rdonly=0
-/bin/dd if=/tmp/etc.tar.gz of=/dev/map/config bs=${BLOCK_SIZE}k count=${DEVCONFIGBLKS} conv=sync
+/bin/dd if=/tmp/etc.tar.gz of=${DEVCONFIG} bs=${BLOCK_SIZE}k count=${DEVCONFIGBLKS} conv=sync
echo '.'
#echo f9 > /dev/led/status
More information about the Zrouter-src
mailing list