| DEVICE_TYPE="buildroot-x86_64" |
| O='artifact-name:,data-part-size:,device-type:' |
| opts="$(getopt -o "${o}" -l "${O}" -- "${@}")" |
| # Ignored to have same options as other scripts |
| DEVICE_TYPE="${2}"; shift 2 |
| ARTIFACT_NAME="${2}"; shift 2 |
| # Create a persistent directory to mount the data partition at. |
| if [[ -L var/lib/mender ]]; then |
| # The common paradigm is to have the persistent data volume at /data for mender. |
| ln -s var/lib/mender data |
| echo "device_type=${DEVICE_TYPE}" > "${TARGET_DIR}/etc/mender/device_type" |
| echo "artifact_name=${ARTIFACT_NAME}" > "${TARGET_DIR}/etc/mender/artifact_info" |