Unverified Commit ad575508 authored by Massimiliano Adamo's avatar Massimiliano Adamo
Browse files

check if the user is root

parent 95a5b3ce
......@@ -88,6 +88,11 @@ def get_version(full_pkg_name):
if __name__ == '__main__':
if os.geteuid() != 0:
print("You need to have root privileges to run this script")
print("Please try again, this time using 'sudo'. Exiting.")
os.sys.exit()
CFG_ONE = os.path.join(
os.path.expanduser('~'), ".ubuntu-kernel-cleanup.ini")
CFG_TWO = '/etc/ubuntu-kernel-cleanup.ini'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment