#!/bin/sh
set -e
# adapted from postinst
chrooted() {
if [ "$(stat -c %d/%i /)" = "$(stat -Lc %d/%i /proc/1/root 2>/dev/null)" ];
then
return 1
fi
return 0
}
check_kernel_features() {
# skip the check if udev is not already active
[ -d /run/udev/ ] || return 0
if [ -e /proc/kallsyms ]; then
local needed_symbols='inotify_init signalfd accept4 open_by_handle_at timerfd_create epoll_create'
for symbol in $needed_symbols; do
if ! egrep -q "^[a-fA-F0-9]+ T \.?sys_${symbol}$" /proc/kallsyms; then
cat <