• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/sh -e
2# Snappy does not yet support CAP_SYS_ADMIN for unconfined snaps, thus sudo:
3# https://bugs.launchpad.net/snappy/+bug/1586581
4# stdout isn't set to line buffered mode:
5# https://bugs.launchpad.net/snappy/+bug/1587675
6
7cmd="$1"
8if [ `id -u` = 0 ] ; then
9	shift
10	stdbuf -oL $SNAP/usr/bin/python "$SNAP/usr/share/bcc/tools/$cmd" $@
11else
12	echo "Need to run $cmd as root (use sudo $@)"
13	exit 1
14fi
15