7bc1c4e
#!/bin/sh -eu
7bc1c4e
7bc1c4e
# This is the install script for Cockpit when run in a privileged container
7bc1c4e
#
7bc1c4e
# The host file system must be mounted at /host
7bc1c4e
7bc1c4e
cd /
7bc1c4e
PATH="/bin:/sbin"
7bc1c4e
7bc1c4e
if [ ! -d /host/etc -o ! -d /host/proc -o ! -d /host/var/run ]; then
7bc1c4e
    echo "host file system is not mounted at /host" >&2
7bc1c4e
    exit 1
7bc1c4e
fi
7bc1c4e
if [ ! -f /host/usr/bin/cockpit-bridge ]; then
7bc1c4e
    echo "cockpit-bridge must be installed in the host" >&2
7bc1c4e
    exit 1
7bc1c4e
fi
7bc1c4e
if [ ! -d /host/usr/share/cockpit ]; then
petervo 4719ef1
    echo "cockpit-system and other resources must be installed in the host" >&2
7bc1c4e
    exit 1
7bc1c4e
fi
7bc1c4e
if [ -f /host/usr/libexec/cockpit-ws ]; then
7bc1c4e
    echo "cockpit-ws must not be installed in the host" >&2
7bc1c4e
    exit 1
7bc1c4e
fi
7bc1c4e
7bc1c4e
set -x
7bc1c4e
7bc1c4e
# Everything else is settings and should remain
7bc1c4e
rm -f /host/etc/pam.d/cockpit