License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[linux-block.git] / samples / bpf / run_cookie_uid_helper_example.sh
CommitLineData
51570a5a 1#!/bin/bash
b2441318 2# SPDX-License-Identifier: GPL-2.0
51570a5a
CF
3local_dir="$(pwd)"
4root_dir=$local_dir/../..
5mnt_dir=$(mktemp -d --tmp)
6
7on_exit() {
00f660ea 8 iptables -D OUTPUT -m bpf --object-pinned ${mnt_dir}/bpf_prog -j ACCEPT
51570a5a
CF
9 umount ${mnt_dir}
10 rm -r ${mnt_dir}
11}
12
13trap on_exit EXIT
14mount -t bpf bpf ${mnt_dir}
00f660ea 15./per_socket_stats_example ${mnt_dir}/bpf_prog $1