-
Notifications
You must be signed in to change notification settings - Fork 29
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
Changes from 1 commit
83936e9
ddf511a
e3764bf
33dbddf
082b770
783c803
92e7ca1
09b0114
76ac512
90e564a
4e8a82f
631f2cf
8ca99bc
dbc5ba2
72a56b3
24cc85e
9a30677
5878591
53a2c7c
8471ae1
29a3061
f48123e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 1 | 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 | 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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ SRC_URI = "\ | |
file://update-system.sh \ | ||
file://download-igc.sh \ | ||
file://transfer-xcsoar.sh \ | ||
file://system-info.sh \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This has nothing to do with rearranging menu items, and probably this fails the build because this script doesn't exist (yet). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you are right! |
||
file://ov-calibrate-ts.sh \ | ||
" | ||
|
||
|
@@ -41,6 +42,7 @@ do_install() { | |
${S}/update-system.sh \ | ||
${S}/download-igc.sh \ | ||
${S}/transfer-xcsoar.sh \ | ||
${S}/system-info.sh \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same |
||
${S}/ov-calibrate-ts.sh \ | ||
${D}${bindir}/ | ||
cd ${D}${bindir} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit does three things:
Doing 3 distinct things in 1 commit obscures the code changes, because one cannot see what was changed; the commitdiff is "remove 20 lines here, add 100 lines over there", but no diff possible.