diff --git a/localscripts/ActivateDHCP.py b/localscripts/ActivateDHCP.py index 42558da..4eaa96e 100644 --- a/localscripts/ActivateDHCP.py +++ b/localscripts/ActivateDHCP.py @@ -39,9 +39,7 @@ if meta_data_path != "False": for mac in macs: name = get_name_by_mac(mac) activate_dhcp(name, family) - - - + sys.exit(1001) else: sys.exit(0) diff --git a/localscripts/EjectDrive.py b/localscripts/EjectDrive.py index 9fc9518..07e67f3 100644 --- a/localscripts/EjectDrive.py +++ b/localscripts/EjectDrive.py @@ -1,10 +1,13 @@ import os import shutil import ctypes +import sys def remove_drive(): drive_letter = os.popen('wmic logicaldisk where VolumeName="config-2" get Caption | findstr /I ":"').read() if drive_letter: - LOG.debug('Eject metadata drive: %s', str(drive_letter).rstrip()) ctypes.windll.WINMM.mciSendStringW(u"open " + str(drive_letter).rstrip() + " type cdaudio alias d_drive", None, 0, None) - ctypes.windll.WINMM.mciSendStringW(u"set d_drive door open", None, 0, None) \ No newline at end of file + ctypes.windll.WINMM.mciSendStringW(u"set d_drive door open", None, 0, None) + +remove_drive() +sys.exit(0) \ No newline at end of file