diff --git a/meta-ov/recipes-apps/ovmenu-ng-skripts/files/system-info.sh b/meta-ov/recipes-apps/ovmenu-ng-skripts/files/system-info.sh new file mode 100644 index 00000000..3b50b8b8 --- /dev/null +++ b/meta-ov/recipes-apps/ovmenu-ng-skripts/files/system-info.sh @@ -0,0 +1,92 @@ +#!/bin/sh +# +# system-info.sh +# System info script gives an overview which packages and which versions are instaled +# +# Created by Blaubart, 2022-02-08 +# + +# collect info of system and more installed packages +IMAGE_VERSION=$(cat /etc/os-release | grep VERSION_ID | cut -d '=' -f 2) +KERNEL_VERSION=$(uname -r) +XCSOAR_MAPS_VERSION=$(opkg list-installed xcsoar-maps* | cut -d '-' -f 4) +XCSOAR_MENU=$(opkg list-installed xcsoar-menu* | cut -d '-' -f 3) +IP_ETH0=$(ip route | grep eth0 | head -n 2 | cut -d ' ' -f 8) +MAC=`ip li|grep -A 1 eth0|tail -n 1|cut -d ' ' -f 6` +HOSTNAME=$(cat /etc/hostname) +IP_WLAN=$(ip route | grep wlan0 | tail -n 2 | head -n 1 | cut -d ' ' -f 8) +I2C_TOOLS=$(opkg list-installed i2c-tools | cut -d '-' -f 3) +E2FSPROGS=$(opkg list-installed e2fsprogs | cut -d '-' -f 2) +USB_MODESWITCH=$(opkg list-installed usb-modeswitch | cut -d '-' -f 3) + +# collect status of SSH, variod and sensord +if /bin/systemctl --quiet is-enabled dropbear.socket +then + SSH_STATUS=enabled +else + SSH_STATUS=disabled +fi + +if /bin/systemctl --quiet is-enabled variod +then + VARIOD_STATUS=enabled +else + VARIOD_STATUS=disabled +fi + +if /bin/systemctl --quiet is-enabled sensord +then + SENSORD_STATUS=enabled +else + SENSORD_STATUS=disabled +fi + +#print info of system and packages +echo ' Image: '$IMAGE_VERSION +echo ' Kernel: '$KERNEL_VERSION + +# collect info of installed packages, depending of testing or stable version is used +if [ -n "$(opkg list-installed xcsoar-testing)" ] +then + XCSOAR_VERSION=$(opkg list-installed xcsoar-testing | cut -d ' - ' -f 3) + echo ' XCSoar-testing: '$XCSOAR_VERSION +else + XCSOAR_VERSION=$(opkg list-installed xcsoar | cut -d '-' -f 2) + echo ' XCSoar:'$XCSOAR_VERSION +fi + +echo ' Maps:'$XCSOAR_MAPS_VERSION +echo ' Menu:'$XCSOAR_MENU + +if [ -n "$(opkg list-installed sensord-testing)" ] +then + SENSORD_VERSION=$(opkg list-installed sensord-testing | cut -d ' - ' -f 3) + echo ' sensord-testing: '$SENSORD_VERSION +else + SENSORD_VERSION=$(opkg list-installed sensord | cut -d '-' -f 2) + echo ' sensord:'$SENSORD_VERSION +fi + +if [ -n "$(opkg list-installed variod-testing)" ] +then + VARIOD_VERSION=$(opkg list-installed variod-testing | cut -d ' - ' -f 3) + echo ' variod-testing: '$VARIOD_VERSION +else + VARIOD_VERSION=$(opkg list-installed variod | cut -d '-' -f 2) + echo ' variod:'$VARIOD_VERSION +fi + +echo ' IP eth0: '$IP_ETH0 +echo ' MAC-address eth0: '$MAC +echo ' Hostname: '$HOSTNAME +echo ' IP wlan0: '$IP_WLAN +echo -e '\n' +echo ' supplementary packages that are not included\n in every image:' +echo ' i2c-tools:'$I2C_TOOLS +echo ' e2fsprogs:'$E2FSPROGS +echo ' usb-modeswitch:'$USB_MODESWITCH +echo -e '\n' +echo ' Status of SSH, variod and sensord:' +echo ' SSH is '$SSH_STATUS +echo ' variod is '$VARIOD_STATUS +echo ' sensord is '$SENSORD_STATUS diff --git a/meta-ov/recipes-apps/ovmenu-ng-skripts/files/transfer-xcsoar.sh b/meta-ov/recipes-apps/ovmenu-ng-skripts/files/transfer-xcsoar.sh index 4d331072..f513b1ae 100755 --- a/meta-ov/recipes-apps/ovmenu-ng-skripts/files/transfer-xcsoar.sh +++ b/meta-ov/recipes-apps/ovmenu-ng-skripts/files/transfer-xcsoar.sh @@ -1,45 +1,227 @@ #!/bin/sh +# +# transfer-xcsoar.sh +# System backup transfer script to and from usbstick for Openvario and XCSoar +# +# Created by lordfolken 2022-02-08 +# Enhanced by 7lima & Blaubart 2022-06-19 +# +# This backup and restore script stores all XCSoar settings and relevant +# Openvario settings like: +# +# -brightness of the display +# -rotation +# -touch screen calibration +# -language settings +# -dropbear settings +# -SSH, variod and sensord status +# +# backups are stored at USB stick at: +# openvario/backup// +# So you can store backups from more than one OV on the same stick! -# Transfer script for Up/Downloadng data to usbstick - -USB_PATH="/usb/usbstick/openvario/" -XCSOAR_PATH="/home/root/.xcsoar" - -case "$(basename "$0")" in - 'download-all.sh') - SRC_PATH="$XCSOAR_PATH" - DEST_PATH="$USB_PATH/download/xcsoar" - ;; - 'upload-xcsoar.sh') - SRC_PATH="$USB_PATH/upload/xcsoar" - DEST_PATH="$XCSOAR_PATH" - ;; - 'upload-all.sh') - SRC_PATH="$USB_PATH/upload" - DEST_PATH="$XCSOAR_PATH" - ;; - *) - >&2 echo 'call as download-all.sh, upload-xcsoar.sh or upload-all.sh' - exit 1 -esac +echo ' [==========] Starting' +echo ' [#=========] Wait until "DONE !!" appears before you exit!' + +# Provident background system buffer sync to help later syncs finish quicker +sync& + +# Path where the USB stick is mounted +USB_PATH=/usb/usbstick + +# XCSoar settings path +export XCSOAR_PATH=/home/root/.xcsoar + +# XCSoar upload path +XCSOAR_UPLOAD_PATH=openvario/upload/xcsoar + +# Backup path within the USB stick +BACKUP=openvario/backup + +# MAC address of the Ethernet device eth0 to do a separate backup +MAC=`ip li|grep -A 1 eth0|tail -n 1|cut -d ' ' -f 6|sed -e s/:/-/g` + +# Restore Shell Function: calls rsync with unified options. +# Copies all files and dirs from source recursively. Parameters: +# $1 source +# $2 target +# $3 comment about type of items +restore() { + if + # We use --checksum here due to cubieboards not having an rtc clock + rsync --recursive --mkpath --checksum --quiet --progress "$1" "$2" + test ${RSYNC_EXIT:=$?} -eq 0 + then + echo " [####======] All $3 files have been restored." + else + >&2 echo " An rsync error $RSYNC_EXIT has occurred!" + fi + # Provident system buffer sync to help later syncs finish quicker + sync& +} + +case `basename "$0"` in +backup-system.sh) + echo ' [##========] System check ...' + + # Store SSH status + if /bin/systemctl --quiet is-enabled dropbear.socket + then echo enabled + elif /bin/systemctl --quiet is-active dropbear.socket + then echo temporary + else echo disabled + fi > /home/root/ssh-status -if [ ! -d "$SRC_PATH" ] || [ ! -d "$DEST_PATH" ]; then - >&2 echo "Source $SRC_PATH or destination path $DEST_PATH does not exist" - exit 1 -fi - -if [ -z "$(find "$SRC_PATH" -type f | head -n 1 2>/dev/null)" ]; then - echo 'No files found !!!' -else - # We use -c here due to cubieboards not having an rtc clock - if rsync -r -c --progress "${SRC_PATH}/" "$DEST_PATH/"; then - echo 'All files transfered successfully.' - else - >&2 echo 'An error has occured!' - exit 1 + # Store variod and sensord status + for DAEMON in variod sensord + do + if /bin/systemctl --quiet is-enabled $DAEMON + then echo enabled + else echo disabled + fi > /home/root/$DAEMON-status + done + + # Store if profiles are protected or not + if [[ 'opkg list-installed | grep "e2fsprogs -"' == *"e2fsprogs"* ]]; + then + PROFILE= find "$XCSOAR_PATH" -maxdepth 1 -type f -name '*.prf' -exec sh -c ' + for PROFILE; + do + mkdir -p /home/root/profile-settings + PROFILE_FILE=`basename "$PROFILE"` + PROFILE_NAME=${PROFILE_FILE%.*} + if lsattr "$PROFILE" | cut -b 5 | fgrep -q i; + then echo protected + else echo unprotected + fi > /home/root/profile-settings/$PROFILE_NAME + done + ' -- {} + fi -fi -# Sync the buffer to be sure data is on disk + # Copy brightness setting + cat /sys/class/backlight/lcd/brightness > /home/root/brightness + + echo ' [####======] Starting backup ...' + # Copy all directories and files from list below to backup directory recursively. + # We use --checksum here due to cubieboards not having an rtc clock + if + rsync --files-from - --archive --recursive --quiet \ + --relative --mkpath --checksum --safe-links \ + --progress \ + / "$USB_PATH/$BACKUP/$MAC"/ <<-LISTE + /etc/locale.conf + /etc/udev/rules.d/libinput-ts.rules + /etc/pointercal + /etc/dropbear + /home/root + /opt/conf + /var/lib/connman + /boot/config.uEnv + LISTE + test ${RSYNC_EXIT:=$?} -eq 0 + then + echo ' [######====] All files and settings have been backed up.' + else + >&2 echo " An rsync error $RSYNC_EXIT has occurred!" + fi;; + +upload-xcsoar.sh) + echo ' [##========] Starting upload of XCSoar files ...' + # Call Shell Function defined above + if + # We use --checksum here due to cubieboards not having an rtc clock + rsync --recursive --mkpath --checksum --quiet --progress "$USB_PATH/$XCSOAR_UPLOAD_PATH"/ "$XCSOAR_PATH" + test ${RSYNC_EXIT:=$?} -eq 0 + then + echo " [####======] All XCSoar files have been uploaded." + else + >&2 echo " An rsync error $RSYNC_EXIT has occurred!" + fi + # Provident system buffer sync to help later syncs finish quicker + sync&;; + +restore-xcsoar.sh) + echo ' [##========] Starting restore of XCSoar ...' + # Call Shell Function defined above + restore "$USB_PATH/$BACKUP/$MAC/$XCSOAR_PATH"/ "$XCSOAR_PATH"/ XCSoar;; + +restore-system.sh) + echo ' [##========] Starting restore ...' + + # Eliminate /etc/opkg backup in case it's present + rm -rf "$USB_PATH/$BACKUP/$MAC"/etc/opkg/ + + # Call Shell Function defined above + restore "$USB_PATH/$BACKUP/$MAC"/ / "Openvario and XCSoar" + /bin/systemctl restart --quiet --now ts_uinput + + # Restore SSH status + case `cat /home/root/ssh-status` in + enabled) + /bin/systemctl enable --quiet --now dropbear.socket + echo " [####======] SSH has been enabled permanently.";; + temporary) + /bin/systemctl disable --quiet --now dropbear.socket + /bin/systemctl start --quiet --now dropbear.socket + echo " [####======] SSH has been enabled temporarily.";; + disabled) + /bin/systemctl disable --quiet --now dropbear.socket + echo " [####======] SSH has been disabled.";; + esac + + # Restore variod and sensord status + for DAEMON in variod sensord + do + case `cat /home/root/$DAEMON-status` in + enabled) /bin/systemctl enable --quiet --now $DAEMON + echo " [#####=====] $DAEMON has been enabled.";; + disabled) /bin/systemctl disable --quiet --now $DAEMON + echo " [#####=====] $DAEMON has been disabled.";; + esac + done + + # Restore protection for profiles if necessary + if [[ 'opkg list-installed | grep "e2fsprogs -"' == *"e2fsprogs"* ]]; + then + PROFILE= find "$XCSOAR_PATH" -maxdepth 1 -type f -name '*.prf' -exec sh -c ' + for PROFILE; + do + PROFILE_FILE=`basename "$PROFILE"` + PROFILE_NAME=${PROFILE_FILE%.*} + case `cat /home/root/profile-settings/"$PROFILE_NAME"` in + protected) chattr +i "$XCSOAR_PATH"/"$PROFILE_NAME.prf" + echo " [######====] $PROFILE_NAME.prf has been protected.";; + unprotected) echo " [######====] $PROFILE_NAME.prf is still unprotected.";; + esac + done + ' -- {} + + else + PROFILE= find "$XCSOAR_PATH" -maxdepth 1 -type f -name '*.prf' -exec sh -c ' + for PROFILE; + do + PROFILE_FILE=`basename "$PROFILE"` + PROFILE_NAME=${PROFILE_FILE%.*} + case `cat /home/root/profile-settings/"$PROFILE_NAME"` in + protected) echo " You try to protect $PROFILE_NAME.prf, but chattr is not installed!";; + esac + done + ' -- {} + + fi + + # Restore brightness setting + cat /home/root/brightness > /sys/class/backlight/lcd/brightness + echo " [#######===] brightness setting has been restored." + + # Restore rotation setting + grep "rotation" /boot/config.uEnv | cut -d '=' -f 2 | tr -d '"' > /sys/class/graphics/fbcon/rotate + echo " [########==] rotation setting has been restored.";; +*) + >&2 echo 'call as backup-system.sh, upload-xcsoar.sh, restore-xcsoar.sh or restore-system.sh' + exit 1;; +esac + +# Sync the system buffer to make sure all data is on disk +echo ' [#########=] Please wait a moment, synchronization is not yet complete!' sync -echo 'Done !!' +echo ' [##########] DONE !! ---------------------------------------------------' +exit $RSYNC_EXIT diff --git a/meta-ov/recipes-apps/ovmenu-ng-skripts/ovmenu-ng-skripts_0.1.bb b/meta-ov/recipes-apps/ovmenu-ng-skripts/ovmenu-ng-skripts_0.1.bb index b89ec231..ba157846 100644 --- a/meta-ov/recipes-apps/ovmenu-ng-skripts/ovmenu-ng-skripts_0.1.bb +++ b/meta-ov/recipes-apps/ovmenu-ng-skripts/ovmenu-ng-skripts_0.1.bb @@ -23,6 +23,7 @@ SRC_URI = "\ file://update-system.sh \ file://download-igc.sh \ file://transfer-xcsoar.sh \ + file://system-info.sh \ file://ov-calibrate-ts.sh \ " @@ -41,12 +42,14 @@ do_install() { ${S}/update-system.sh \ ${S}/download-igc.sh \ ${S}/transfer-xcsoar.sh \ + ${S}/system-info.sh \ ${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 - ln -s -r transfer-xcsoar.sh download-all.sh } FILES:${PN} = " \ diff --git a/meta-ov/recipes-apps/ovmenu-ng/files/ovmenu-ng.sh b/meta-ov/recipes-apps/ovmenu-ng/files/ovmenu-ng.sh index 3a3bfa4d..a0035e9c 100755 --- a/meta-ov/recipes-apps/ovmenu-ng/files/ovmenu-ng.sh +++ b/meta-ov/recipes-apps/ovmenu-ng/files/ovmenu-ng.sh @@ -15,22 +15,22 @@ do --title "[ M A I N - M E N U ]" \ --begin 3 4 \ --menu "You can use the UP/DOWN arrow keys" 15 50 6 \ - XCSoar "Start XCSoar" \ - File "Copys file to and from OpenVario" \ - System "Update, Settings, ..." \ - Exit "Exit to the shell" \ - Restart "Restart" \ + XCSoar "Start XCSoar" \ + File "Copys file to and from OpenVario" \ + System "Update, Settings, ..." \ + Exit "Exit to the shell" \ + Restart "Restart" \ Power_OFF "Power OFF" 2>"${INPUT}" menuitem=$(<"${INPUT}") # make decsion case $menuitem in - XCSoar) start_xcsoar;; - File) submenu_file;; - System) submenu_system;; - Exit) yesno_exit;; - Restart) yesno_restart;; + XCSoar) start_xcsoar;; + File) submenu_file;; + System) submenu_system;; + Exit) yesno_exit;; + Restart) yesno_restart;; Power_OFF) yesno_power_off;; esac @@ -45,17 +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" \ - Back "Back to Main" 2>"${INPUT}" + 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" \ + Back "Back to Main" 2>"${INPUT}" menuitem=$(<"${INPUT}") # make decsion case $menuitem in - Download_IGC) download_igc_files;; - Download) download_files;; - Upload) upload_files;; + Download_IGC) download_igc_files;; + Update_Maps) update_maps_files;; + Upload_XCSoar) upload_xcsoar_files;; + Backup) backup_files;; + Restore) restore_files;; + Restore_XCSoar) restore_xcsoar_files;; Exit) ;; esac } @@ -66,13 +72,12 @@ function submenu_system() { --title "[ S Y S T E M ]" \ --begin 3 4 \ --menu "You can use the UP/DOWN arrow keys" 15 50 6 \ - Update_System "Update system software" \ - Update_Maps "Update Maps files" \ - Calibrate_Sensors "Calibrate Sensors" \ + Update_System "Update system software" \ + Calibrate_Sensors "Calibrate Sensors" \ Calibrate_Touch "Calibrate Touch" \ - Settings "System Settings" \ - Information "System Info" \ - Back "Back to Main" 2>"${INPUT}" + Settings "System Settings" \ + Information "System Info" \ + Back "Back to Main" 2>"${INPUT}" menuitem=$(<"${INPUT}") @@ -81,9 +86,6 @@ function submenu_system() { Update_System) update_system ;; - Update_Maps) - update_maps - ;; Calibrate_Sensors) calibrate_sensors ;; @@ -100,30 +102,9 @@ function submenu_system() { esac } -function show_info() { - ### collect info of system - XCSOAR_VERSION=$(opkg list-installed xcsoar | awk -F' ' '{print $3}') - XCSOAR_MAPS_VERSION=$(opkg list-installed | grep "xcsoar-maps-" | awk -F' ' '{print $3}') - IMAGE_VERSION=$(cat /etc/os-release | grep VERSION_ID | awk -F'=' -F'"' '{print $2}') - SENSORD_VERSION=$(opkg list-installed sensord* | awk -F' ' '{print $3}') - VARIOD_VERSION=$(opkg list-installed variod* | awk -F' ' '{print $3}') - IP_ETH0=$(/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}') - IP_WLAN=$(/sbin/ifconfig wlan0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}') - - dialog --backtitle "OpenVario" \ - --title "[ S Y S T E M I N F O ]" \ - --begin 3 4 \ - --msgbox " \ - \n \ - Image: $IMAGE_VERSION\n \ - XCSoar: $XCSOAR_VERSION\n \ - Maps: $XCSOAR_MAPS_VERSION\n \ - sensord: $SENSORD_VERSION\n \ - variod: $VARIOD_VERSION\n \ - IP eth0: $IP_ETH0\n \ - IP wlan0: $IP_WLAN\n \ - " 15 50 - +function show_info() { + /usr/bin/system-info.sh > /tmp/tail.$$ & + dialog --backtitle "OpenVario" --title "Result" --tailbox /tmp/tail.$$ 30 50 } function submenu_settings() { @@ -132,11 +113,11 @@ function submenu_settings() { --title "[ S Y S T E M ]" \ --begin 3 4 \ --menu "You can use the UP/DOWN arrow keys" 15 50 5 \ - Display_Rotation "Set rotation of the display" \ - LCD_Brightness "Set display brightness" \ - XCSoar_Language "Set language used for XCSoar" \ - SSH "Enable or disable SSH" \ - Back "Back to Main" 2>"${INPUT}" + Display_Rotation "Set rotation of the display" \ + LCD_Brightness "Set display brightness" \ + XCSoar_Language "Set language used for XCSoar" \ + SSH "Enable or disable SSH" \ + Back "Back to Main" 2>"${INPUT}" menuitem=$(<"${INPUT}") @@ -206,9 +187,9 @@ function submenu_ssh() { --begin 3 4 \ --default-item "${state}" \ --menu "SSH access is currently ${state}." 15 50 4 \ - enabled "Enable SSH permanently" \ + enabled "Enable SSH permanently" \ temporary "Enable SSH temporarily (until reboot)" \ - disabled "Disable SSH" \ + disabled "Disable SSH" \ 2>"${INPUT}" menuitem=$(<"${INPUT}") @@ -291,7 +272,7 @@ function update_system() { response=$? case $response in - 0) opkg upgrade &>/tmp/tail.$$ + 0) opkg upgrade &>/tmp/tail.$$ # TODO shouldn't it be "&>>" ? sync dialog --backtitle "OpenVario" --title "Result" --tailbox /tmp/tail.$$ 30 50 ;; @@ -311,9 +292,9 @@ function calibrate_sensors() { *) return 0 esac - echo "Calibrating Sensors ..." >> /tmp/tail.$$ + echo "Calibrating Sensors ..." >> /tmp/tail.$$ # TODO shouldn't it be ">" ? systemctl stop variod.service sensord.socket 'sensord@*.service' - /opt/bin/sensorcal -c > /tmp/tail.$$ + /opt/bin/sensorcal -c > /tmp/tail.$$ # TODO shouldn't it be ">>" ? if [ $? -eq 2 ] then @@ -325,10 +306,10 @@ function calibrate_sensors() { response=$? case $response in - 0) /opt/bin/sensorcal -i > /tmp/tail.$$ + 0) /opt/bin/sensorcal -i > /tmp/tail.$$ # TODO shouldn't it be ">>" ? ;; esac - echo "Please run sensorcal again !!!" > /tmp/tail.$$ + echo "Please run sensorcal again !!!" > /tmp/tail.$$ # TODO shouldn't it be ">>" ? fi sync dialog --backtitle "OpenVario" --title "Result" --tailbox /tmp/tail.$$ 30 50 @@ -336,36 +317,46 @@ function calibrate_sensors() { } function calibrate_touch() { - echo "Calibrating Touch ..." >> /tmp/tail.$$ + echo "Calibrating Touch ..." >> /tmp/tail.$$ # TODO shouldn't it be ">" ? /usr/bin/ov-calibrate-ts.sh >> /tmp/tail.$$ dialog --msgbox "Calibration OK!" 10 50 } # Copy /usb/usbstick/openvario/maps to /home/root/.xcsoar # Copy only xcsoar-maps*.ipk and *.xcm files -function update_maps() { +function update_maps_files() { echo "Updating Maps ..." > /tmp/tail.$$ /usr/bin/update-maps.sh >> /tmp/tail.$$ 2>/dev/null & 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.$$ - /usr/bin/upload-xcsoar.sh >> /tmp/tail.$$ & +# Copy XCSoar and OpenVario settings to /usb/usbstick/openvario/backup/ +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_files() { + /usr/bin/upload-xcsoar.sh > /tmp/tail.$$ & + dialog --backtitle "OpenVario" --title "Result" --tailbox /tmp/tail.$$ 30 50 +} + +# Copy XCSoar and OpenVario settings from /usb/usbstick/openvario/backup/ +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//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 } diff --git a/meta-ov/recipes-core/images/openvario-image-testing.bb b/meta-ov/recipes-core/images/openvario-image-testing.bb index f3a4a6bd..297603ec 100644 --- a/meta-ov/recipes-core/images/openvario-image-testing.bb +++ b/meta-ov/recipes-core/images/openvario-image-testing.bb @@ -8,7 +8,7 @@ IMAGE_INSTALL += "\ xcsoar-menu \ xcsoar-profiles \ xcsoar-maps-default \ - sensord-testing\ + sensord \ variod-testing \ ovmenu-ng \ "