mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-26 23:36:51 +00:00
Part of fix for https://github.com/tttech-industrial-buchsbaum/acrn-hypervisor/issues/6 Tracked-On: #6688 Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
17 lines
574 B
Bash
Executable File
17 lines
574 B
Bash
Executable File
#!/bin/sh
|
|
# helper to start ACRN lifemnr according to VM type
|
|
|
|
# must coincide with fixed coding in
|
|
# misc/services/life_mngr/config.h
|
|
LIFE_MNGR_CONFIG_PATH="/etc/life_mngr/life_mngr.conf"
|
|
# distinguish service/user VM
|
|
LIFEMNGR_VM=${LIFEMNGR_VM:-$(if [ -c /dev/acrn_hsm ]; then echo service_vm; else echo user_vm; fi)}
|
|
|
|
# eventually install default configuration
|
|
if [ ! -f ${LIFE_MNGR_CONFIG_PATH} ]; then
|
|
mkdir -p $(dirname ${LIFE_MNGR_CONFIG_PATH})
|
|
cp /usr/share/acrn-lifemngr/life_mngr.conf.${LIFEMNGR_VM} ${LIFE_MNGR_CONFIG_PATH}
|
|
fi
|
|
|
|
exec /usr/bin/acrn-lifemngr
|