Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve backup and restore procedure #320

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
83936e9
Squashed commit for Openvario merge request "improve backup and resto…
Jun 18, 2022
ddf511a
rearranging the menu items
Blaubart Jul 12, 2022
e3764bf
improve progress bar
Blaubart Jul 12, 2022
33dbddf
Moved system info functionality into new script system-info.sh. Exten…
7lima Jul 16, 2022
082b770
Update_Maps menu item moved from submenu_system to submenu_file
7lima Jul 17, 2022
783c803
Renaming, addition and reordering of backup/restore functions.
7lima Jul 17, 2022
92e7ca1
Complete rewrite and extension of lordfolken's transfer-xcsoar.sh.
7lima Jul 17, 2022
09b0114
Merge branch 'pull_request_315-branch' into pull_request_317-branch
7lima Jul 17, 2022
76ac512
Manually reverted my .gitignore customisations from former times.
7lima Jul 17, 2022
90e564a
Fixed newly introduced problems in menu code.
7lima Jul 17, 2022
4e8a82f
Update transfer-xcsoar.sh
Blaubart Aug 13, 2022
631f2cf
Update transfer-xcsoar.sh
Blaubart Aug 14, 2022
8ca99bc
Update transfer-xcsoar.sh
Blaubart Aug 15, 2022
dbc5ba2
Update transfer-xcsoar.sh
Blaubart Aug 15, 2022
72a56b3
implement automatic rotation after backup
Blaubart Mar 9, 2023
24cc85e
Update transfer-xcsoar.sh
Blaubart Mar 30, 2023
9a30677
bug fix - check if e2fsprogs is installed
Blaubart Mar 31, 2023
5878591
Bug fix - IP of eth0 and wlan0 was not found
Blaubart Apr 10, 2023
53a2c7c
add a new line at the end of the file
Blaubart Apr 10, 2023
8471ae1
removing double quote from the rotation value
Blaubart Apr 10, 2023
29a3061
Update openvario-image-testing.bb
Blaubart Apr 10, 2023
f48123e
restart tslib after restore
Blaubart Apr 14, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ USB_PATH="/usb/usbstick/openvario/"
XCSOAR_PATH="/home/root/.xcsoar"

case "$(basename "$0")" in
'download-all.sh')
'backup-system.sh')
SRC_PATH="$XCSOAR_PATH"
DEST_PATH="$USB_PATH/download/xcsoar"
;;
'upload-xcsoar.sh')
'restore-xcsoar.sh')
SRC_PATH="$USB_PATH/upload/xcsoar"
DEST_PATH="$XCSOAR_PATH"
;;
'upload-all.sh')
'restore-system.sh')
SRC_PATH="$USB_PATH/upload"
DEST_PATH="$XCSOAR_PATH"
;;
*)
>&2 echo 'call as download-all.sh, upload-xcsoar.sh or upload-all.sh'
>&2 echo 'call as backup-system.sh, restore-xcsoar.sh or restore-system.sh'
exit 1
esac

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ do_install() {
${S}/ov-calibrate-ts.sh \
${D}${bindir}/
cd ${D}${bindir}
ln -s -r transfer-xcsoar.sh upload-all.sh
ln -s -r transfer-xcsoar.sh restore-system.sh
ln -s -r transfer-xcsoar.sh restore-xcsoar.sh
ln -s -r transfer-xcsoar.sh backup-system.sh
ln -s -r transfer-xcsoar.sh upload-xcsoar.sh
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this script?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This script is to upload files like XCSoar profile, Flarmnet database etc. to /home/root/.xcsoar. We still have to add this part to transfer-xcsoar.sh

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My point was: this part of the commit doesn't belong in this commit!

ln -s -r transfer-xcsoar.sh download-all.sh
}

FILES:${PN} = " \
Expand Down
42 changes: 28 additions & 14 deletions meta-ov/recipes-apps/ovmenu-ng/files/ovmenu-ng.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,23 @@ function submenu_file() {
--begin 3 4 \
--menu "You can use the UP/DOWN arrow keys" 15 50 4 \
Download_IGC "Download XCSoar IGC files to USB" \
Download "Download XCSoar to USB" \
Upload "Upload files from USB to XCSoar" \
Update_Maps "Update Maps" \
Upload_XCSoar "Update or upload XCSoar files" \
Backup "Backup XCSoar and OV settings" \
Restore "Restore XCSoar and OV settings" \
Restore_XCSoar "Restore only XCSoar settings" \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fail to grasp this diff. This removes 2 menu items and adds 4 different menu items. Then I read the commit message, but none of this appears to makes sense.

Back "Back to Main" 2>"${INPUT}"

menuitem=$(<"${INPUT}")

# make decsion
case $menuitem in
Download_IGC) download_igc_files;;
Download) download_files;;
Upload) upload_files;;
Update_Maps) update_maps_files;;
Upload_XCSoar) upload_xcsoar_files;;
Backup) backup_files;;
Restore) restore_files;;
Restore_XCSoar) restore_xcsoar_files;;
Exit) ;;
esac
}
Expand Down Expand Up @@ -326,26 +330,36 @@ function update_maps() {
dialog --backtitle "OpenVario" --title "Result" --tailbox /tmp/tail.$$ 30 50
}

# Copy /home/root/.xcsoar to /usb/usbstick/openvario/download/xcsoar
function download_files() {
echo "Downloading files ..." > /tmp/tail.$$
/usr/bin/download-all.sh >> /tmp/tail.$$ &
dialog --backtitle "OpenVario" --title "Result" --tailbox /tmp/tail.$$ 30 50
}

# Copy /home/root/.xcsoar/logs to /usb/usbstick/openvario/igc
# Copy only *.igc files
function download_igc_files() {
/usr/bin/download-igc.sh
}

# Copy /usb/usbstick/openvario/upload to /home/root/.xcsoar
function upload_files(){
echo "Uploading files ..." > /tmp/tail.$$
# Copy XCSaor and OpenVario settings to /usb/usbstick/openvario/backup/<MAC address of eth0>
function backup_files() {
/usr/bin/backup-system.sh >> /tmp/tail.$$ &
dialog --backtitle "OpenVario" --title "Result" --tailbox /tmp/tail.$$ 30 50
}

# Copy usb/usbstick/openvario/upload/xcsoar to /home/root/.xcsoar
function upload_xcsoar() {
/usr/bin/upload-xcsoar.sh >> /tmp/tail.$$ &
dialog --backtitle "OpenVario" --title "Result" --tailbox /tmp/tail.$$ 30 50
}

# Copy XCSaor and OpenVario settings from /usb/usbstick/openvario/backup/<MAC address of eth0>
function restore_files(){
/usr/bin/restore-system.sh >> /tmp/tail.$$ &
dialog --backtitle "OpenVario" --title "Result" --tailbox /tmp/tail.$$ 30 50
}

# Copy /usb/usbstick/openvario/backup/<MAC address of eth0>/home/root/.xcsoar to /home/root/.xcsoar
function restore_xcsoar_files(){
/usr/bin/restore-xcsoar.sh >> /tmp/tail.$$ &
dialog --backtitle "OpenVario" --title "Result" --tailbox /tmp/tail.$$ 30 50
}

function start_xcsoar() {
/usr/bin/xcsoar -fly
sync
Expand Down