2023-03-28 15:00:27 +02:00
|
|
|
#!/usr/bin/python3
|
2012-04-26 15:48:42 +02:00
|
|
|
|
|
|
|
|
from time import sleep
|
|
|
|
|
import dbus
|
|
|
|
|
|
|
|
|
|
bus = dbus.SystemBus()
|
|
|
|
|
|
2012-07-24 10:19:52 +02:00
|
|
|
snapper = dbus.Interface(bus.get_object('org.opensuse.Snapper', '/org/opensuse/Snapper'),
|
|
|
|
|
dbus_interface='org.opensuse.Snapper')
|
2012-04-26 15:48:42 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
snapper.LockConfig("root")
|
2024-02-07 11:20:08 +01:00
|
|
|
print("locked")
|
|
|
|
|
|
|
|
|
|
snapper.LockConfig("root")
|
|
|
|
|
snapper.UnlockConfig("root")
|
|
|
|
|
print("still locked")
|
2012-04-26 15:48:42 +02:00
|
|
|
|
|
|
|
|
sleep(10)
|
|
|
|
|
|
|
|
|
|
snapper.UnlockConfig("root")
|
2024-02-07 11:20:08 +01:00
|
|
|
print("unlocked")
|
|
|
|
|
|
|
|
|
|
sleep(10)
|