lol. forgot to actually call it.
This commit is contained in:
parent
eb6999169e
commit
c49112a28d
@ -55,14 +55,15 @@ def chkDisk(disk):
|
|||||||
subprocess.run(c, stdout = DEVNULL)
|
subprocess.run(c, stdout = DEVNULL)
|
||||||
return()
|
return()
|
||||||
|
|
||||||
def main():
|
|
||||||
for d in getDisks():
|
|
||||||
chkDisk(d)
|
|
||||||
|
|
||||||
def userChk():
|
def userChk():
|
||||||
# Needs to be run as root/with sudo, because of e.g. cryptsetup, etc.
|
# Needs to be run as root/with sudo, because of e.g. cryptsetup, etc.
|
||||||
if os.geteuid() != 0:
|
if os.geteuid() != 0:
|
||||||
raise PermissionError('This script must be run with root privileges.')
|
raise PermissionError('This script must be run with root privileges.')
|
||||||
|
|
||||||
|
def main():
|
||||||
|
userChk()
|
||||||
|
for d in getDisks():
|
||||||
|
chkDisk(d)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
Loading…
Reference in New Issue
Block a user