Logo Search packages:      
Sourcecode: unattended-upgrades version File versions  Download package

create_debug_lock.py

#!/usr/bin/python
#
# create a lock file so that unattended-upgrades-shutdown pauses
# on shutdown -- useful for testing

import apt_pkg
import os
import time

pid = os.fork()
if pid == 0:
    os.setsid()
    lock = apt_pkg.GetLock("/var/run/unattended-upgrades.lock")
    time.sleep(500)

Generated by  Doxygen 1.6.0   Back to index