3
# Wrapper script to determine if user is a member of the netdev group or not
4
# and exec wpa_gui with or without root privileges.
6
# Copyright: Copyright (c) 2008, Kel Modderman <kel@otaku42.de>
9
WPAGUI=/usr/sbin/wpa_gui
11
if id -Gn | grep -q -w netdev; then
12
# caller is a member of the netdev group, if instructions in
13
# README.Debian were followed to setup wpa-roam they will find
14
# wpa_gui quite useful
16
elif which su-to-root >/dev/null; then
17
# caller is not a member of netdev group, and thus most
18
# likely requires root for wpa_gui to be useful
19
exec su-to-root -X -c $WPAGUI "$@"
21
# not a member of netdev group and not able to su-to-root, just
22
# exec it and hope for the best ...