You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
405 B
15 lines
405 B
#!/bin/sh -e
|
|
# Snappy does not yet support CAP_SYS_ADMIN for unconfined snaps, thus sudo:
|
|
# https://bugs.launchpad.net/snappy/+bug/1586581
|
|
# stdout isn't set to line buffered mode:
|
|
# https://bugs.launchpad.net/snappy/+bug/1587675
|
|
|
|
cmd="$1"
|
|
if [ `id -u` = 0 ] ; then
|
|
shift
|
|
stdbuf -oL $SNAP/usr/bin/python "$SNAP/usr/share/bcc/tools/$cmd" $@
|
|
else
|
|
echo "Need to run $cmd as root (use sudo $@)"
|
|
exit 1
|
|
fi
|