Skip to content

Commit

Permalink
projects/S*05: add an option to copy user data when installing to int…
Browse files Browse the repository at this point in the history
…ernal memory
  • Loading branch information
kszaq committed Nov 28, 2016
1 parent 052376e commit bbf2e7f
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 6 deletions.
22 changes: 19 additions & 3 deletions projects/S805/filesystem/usr/sbin/installtointernal
Expand Up @@ -72,9 +72,25 @@ install_to_nand() {
echo "done."
fi

echo "All done! Rebooting in 10s..."
sleep 10
rebootfromnand
read -p "Do you want to copy your user data to internal data partition? [Y/n] " choice
case "$choice" in
[nN]*)
;;
*)
echo -n "Stopping Kodi..."
systemctl stop kodi
echo "done."
echo "Copying user data..."
mkdir -p /tmp/data
mount -o rw /dev/data /tmp/data
cp -av /storage/. /tmp/data/
echo -n "Restarting Kodi..."
systemctl start kodi
echo "done."
;;
esac

echo "All done! You can now continue using your LE system or type \"rebootfromnand\" to reboot from internal memory."

else
echo "No LE image found on /flash! Exiting..."
Expand Down
23 changes: 20 additions & 3 deletions projects/S905/filesystem/usr/sbin/installtointernal
Expand Up @@ -91,9 +91,26 @@ install_to_nand() {
echo "done."
fi

echo "All done! Rebooting in 10s..."
sleep 10
rebootfromnand
read -p "Do you want to copy your user data to internal data partition? [Y/n] " choice
case "$choice" in
[nN]*)
;;
*)
echo -n "Stopping Kodi..."
systemctl stop kodi
echo "done."
echo "Copying user data..."
mkdir -p /tmp/data
mount -o rw /dev/data /tmp/data
cp -av /storage/. /tmp/data/
echo -n "Restarting Kodi..."
systemctl start kodi
echo "done."
;;
esac

echo "All done! You can now continue using your LE system or type \"rebootfromnand\" to reboot from internal memory."
echo "WARNING: If your internal memory layout is different from standard Amlogic, you have to reboot and perform this operation again!"

else
echo "No LE image found on /flash! Exiting..."
Expand Down

0 comments on commit bbf2e7f

Please sign in to comment.