3 # Capabilities get lost when creating the fai base.tar.xz image.
7 # note on an ubuntu 16.04 system, these caps were set without this script
8 # running. I wonder if it is actually needed on a debian 8 system.
12 if [ ! -x $target/sbin
/setcap
] ; then
16 for FILE
in /bin
/ping /bin
/ping6
/usr
/bin
/fping
/usr
/bin
/fping6
; do
17 if [ -x $target/$FILE ] ; then
18 if $ROOTCMD /sbin
/setcap cap_net_raw
+ep
$FILE; then
19 echo "Setcap worked! $FILE is not suid!"
23 if [ -x $target/usr
/bin
/systemd-detect-virt
] ; then
24 $ROOTCMD /sbin
/setcap cap_dac_override
,cap_sys_ptrace
+ep
/usr
/bin
/systemd-detect-virt