Unverified Commit 3caae257 authored by Michal Hrusecky's avatar Michal Hrusecky 🐉
Browse files

turris-btrfs: Support just restore functionality

parent 645fa30c
......@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=turris-btrfs-migrate
PKG_VERSION:=1.5
PKG_RELEASE:=3
PKG_RELEASE:=4
PKG_SOURCE_SUBDIR:=$(PKG_NAME)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
......
......@@ -21,12 +21,17 @@ die() {
exit 1
}
RESTORE=""
[ "$1" \!= restore ] || RESTORE=yes
[ -b /dev/mmcblk0 ] || die "No MicroSD card present!"
[ -n "`mount | grep ubi`" ] || die "1.1 firmware required!"
mkdir -p /etc/schnapps
echo 'ROOT_DEV="/dev/mmcblk0p2"' > /etc/schnapps/config
if [ -z "$RESTORE" ]; then
ANS=""
echo "Are you sure you want to lose everything on mmcblk0? (yes/no)"
read ANS
......@@ -65,6 +70,8 @@ umount /tmp/btrfs-convert/target/@/boot/tefi
umount /tmp/btrfs-convert/target
umount /tmp/btrfs-convert/src
fi
# Setup u-Boot
fw_setenv -s - <<EOF
baudrate 115200
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment