Skip to content

Commit 2356bab

Browse files
committed
feat: add --setup-only flag to entrypoint for init container use
Signed-off-by: danbugs <danilochiarlone@gmail.com>
1 parent d2791a7 commit 2356bab

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

host/pyhl-entrypoint.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
set -e
33

4-
if [ ! -d "$PYHL_HOME/snapshot" ]; then
4+
if [ ! -f "$PYHL_HOME/snapshot/index.json" ]; then
55
staging=$(mktemp -d)
66
mkdir -p "$staging/.unikraft/build"
77
ln -s "$PYHL_HOME/kernel" "$staging/.unikraft/build/driver_hyperlight-x86_64"
@@ -10,4 +10,8 @@ if [ ! -d "$PYHL_HOME/snapshot" ]; then
1010
rm -rf "$staging"
1111
fi
1212

13+
if [ "$1" = "--setup-only" ]; then
14+
exit 0
15+
fi
16+
1317
exec pyhl run --dest "$PYHL_HOME" --net "$@"

0 commit comments

Comments
 (0)