#!/bin/bash # -*- coding: utf-8 -*- # # Copyright (C) 2018 Linaro Limited # # Author: Senthil Kumaran S # # This file is part of LAVA LXC mocker. # # License: MIT - see the LICENSE file for details # # Mocks lxc-info command which is used by LAVA. while [[ $# -gt 0 ]] do key="$1" case $key in -sH) STATUS=1 shift ;; -iH) IP=1 shift ;; -n) LXC_NAME="$2" shift shift ;; *) esac done if [ "$STATUS" ]; then # echo running state. echo "'$LXC_NAME' state is RUNNING" exit 0 fi if [ "$IP" ]; then # echo a dummy ip. echo "'$LXC_NAME' IP address is: '0.0.0.0'" exit 0 fi