#!/bin/sh """": # -*-python-*- bup_python="$(dirname "$0")/../cmd/bup-python" || exit $? exec "$bup_python" "$0" ${1+"$@"} """ # end of bup preamble import sys if sys.platform.startswith('cygwin'): import ctypes if ctypes.cdll.shell32.IsUserAnAdmin(): print 'root' else: print 'none' else: import os if os.environ.get('FAKEROOTKEY'): print 'fake' else: if os.geteuid() == 0: print 'root' else: print 'none'