| 1 |
#!/bin/sh |
| 2 |
# |
| 3 |
# Returns the update-modules currently installed on the system |
| 4 |
# For more information on update-modules see: |
| 5 |
# https://hub.mender.io/c/update-modules/13 |
| 6 |
# |
| 7 |
|
| 8 |
set -e |
| 9 |
|
| 10 |
RESET_INVENTORY="true" |
| 11 |
|
| 12 |
if [ ! -d /usr/share/mender/modules/ ]; then |
| 13 |
echo update_modules="" |
| 14 |
exit 0 |
| 15 |
fi |
| 16 |
|
| 17 |
for file in /usr/share/mender/modules/*/*; do |
| 18 |
if [ ! -x "${file}" ]; then |
| 19 |
continue |
| 20 |
fi |
| 21 |
echo update_modules=$(basename "${file}") |
| 22 |
RESET_INVENTORY="false" |
| 23 |
done |
| 24 |
|
| 25 |
if [ "${RESET_INVENTORY}" = "true" ]; then |
| 26 |
echo update_modules="" |
| 27 |
fi |