Files
operating-system/buildroot-external/rootfs-overlay/usr/sbin/hassos-cli
Pascal Vizeli 60c9013535 Travis (#269)
* Update build-all.sh

* Delete ovf-create.sh

* Update patches.sh

* Update hdd-image.sh

* Create .travis.yml

* Update hdd-image.sh

* Update hdd-image.sh

* Update hdd-image.sh

* Update hdd-image.sh

* Update ota.sh

* Update post-build.sh

* Update post-image.sh

* Update rauc.sh

* Update rootfs-layer.sh

* Update hassos-cli

* Update hassos-supervisor

* Update hassos-config

* Update hassos-apparmor

* Update hassos-expand

* Update hassos-persists-journald

* Update hassos-rate

* Update hassos-hook.sh

* Update hassos-hook.sh

* Rename uboot-boot.sh to uboot-boot.ush

* Rename uboot-boot.sh to uboot-boot.ush

* Update hassos-hook.sh

* Rename uboot-boot.sh to uboot-boot.ush

* Rename uboot-boot.sh to uboot-boot.ush

* Update hassos-hook.sh

* Update odroid_c2_defconfig

* Update rpi0_w_defconfig

* Update rpi2_defconfig

* Update rpi3_64_defconfig

* Update rpi3_defconfig

* Update rpi_defconfig

* Update tinker_defconfig

* Update enter.sh

* Update .travis.yml
2018-11-30 16:22:04 +01:00

29 lines
601 B
Bash
Executable File

#!/bin/sh
# Load configs
CONFIG_FILE=/mnt/data/hassos.json
CLI="$(jq --raw-output '.cli' ${CONFIG_FILE})"
DOCKER_ARGS="$(jq --raw-output '.cli_args // empty' ${CONFIG_FILE})"
APPARMOR="$(jq --raw-output '.cli_apparmor // "docker-default"' ${CONFIG_FILE})"
CLI_DATA=/mnt/data/cli
mkdir -p ${CLI_DATA}
# Run CLI
# shellcheck disable=SC2086
docker container run \
--rm -ti --init \
--security-opt apparmor="${APPARMOR}" \
-v ${CLI_DATA}:/data \
-v /etc/machine-id:/etc/machine-id:ro \
$DOCKER_ARGS \
"${CLI}"
# Jump to root shell
if [ $? -eq 10 ]; then
/bin/ash
fi
exit