@@ -28,7 +28,7 @@ from shlex import quote
2828import xml .etree .ElementTree as ET
2929
3030# Constants
31- VERSION = "0.1.1 "
31+ VERSION = "0.1.2 "
3232ZYPPER_PID_FILE = "/run/zypp.pid"
3333VALID_CMD = ["dup" , "run" , "rollback" ]
3434VALID_OPT = ["--reboot" , "--apply" , "--shell" , "--continue" , "--no-verify" , \
@@ -380,7 +380,7 @@ if COMMAND in ["dup", "run"]:
380380 rootfs_device = out ["source" ].split ("[" )[0 ]
381381 logging .debug (f"Btrfs root device: { rootfs_device } " )
382382 # populate temp dir with atomic snapshot mounts
383- logging .info ("Setting up temp mounts..." )
383+ logging .debug ("Setting up temp mounts..." )
384384 commands = f"""
385385mount -o subvol={ snap_subvol } { rootfs_device } { TMP_MOUNT_DIR } ;
386386for i in dev proc run sys; do mount --rbind --make-rslave /$i { TMP_MOUNT_DIR } /$i; done;
@@ -411,7 +411,8 @@ chroot {TMP_MOUNT_DIR} mount -a;
411411 shell_exec (f"snapper -c { snapper_root_config } delete { atomic_snap } " )
412412 cleanup ()
413413 sys .exit (9 )
414- logging .info (f"Distribution upgrade completed successfully" )
414+ else :
415+ logging .info (f"Distribution upgrade completed successfully" )
415416 elif COMMAND == "run" :
416417 exec_cmd = ' ' .join (ARG )
417418 logging .info (f"Running command { exec_cmd !r} within chroot..." )
@@ -423,7 +424,8 @@ chroot {TMP_MOUNT_DIR} mount -a;
423424 shell_exec (f"snapper -c { snapper_root_config } delete { atomic_snap } " )
424425 cleanup ()
425426 sys .exit (9 )
426- logging .info ("Command run successfully" )
427+ else :
428+ logging .info ("Command run successfully" )
427429 if SHELL :
428430 logging .info (f"Opening bash shell within chroot of snapshot { atomic_snap } " )
429431 logging .info ("Continue with 'exit 0' or discard with 'exit 1'" )
0 commit comments