diff -Nru backintime-common-1.0.32~raring/config.py backintime-common-1.0.34~raring/config.py --- backintime-common-1.0.32~raring/config.py 2013-12-13 18:27:42.000000000 +0000 +++ backintime-common-1.0.34~raring/config.py 2013-12-21 12:40:48.000000000 +0000 @@ -43,7 +43,7 @@ class Config( configfile.ConfigFileWithProfiles ): APP_NAME = 'Back In Time' - VERSION = '1.0.32' + VERSION = '1.0.34' COPYRIGHT = 'Copyright (c) 2008-2013 Oprea Dan, Bart de Koning, Richard Bailey, Germar Reitze' CONFIG_VERSION = 5 diff -Nru backintime-common-1.0.32~raring/debian/changelog backintime-common-1.0.34~raring/debian/changelog --- backintime-common-1.0.32~raring/debian/changelog 2013-12-13 18:27:53.000000000 +0000 +++ backintime-common-1.0.34~raring/debian/changelog 2013-12-21 12:41:12.000000000 +0000 @@ -1,3 +1,4 @@ -backintime-common (1.0.32~raring) raring; urgency=low - * Fix bug: cron scheduled snapshots won't start with 1.0.30 - -- BIT Team Fri, 13 Dec 2013 19:26:58 +0100 +backintime-common (1.0.34~raring) raring; urgency=low + * sync/flush all disks before shutdown (https://bugs.launchpad.net/bugs/1261031) + * Fix bug: BIT running as root shutdown after snapshot, regardless of option checked (https://bugs.launchpad.net/bugs/1261022) + -- BIT Team Sat, 21 Dec 2013 13:39:49 +0100 diff -Nru backintime-common-1.0.32~raring/doc/CHANGES backintime-common-1.0.34~raring/doc/CHANGES --- backintime-common-1.0.32~raring/doc/CHANGES 2013-12-13 18:27:42.000000000 +0000 +++ backintime-common-1.0.34~raring/doc/CHANGES 2013-12-21 12:40:48.000000000 +0000 @@ -1,5 +1,9 @@ Back In Time +Version 1.0.34 +* sync/flush all disks before shutdown (https://bugs.launchpad.net/bugs/1261031) +* Fix bug: BIT running as root shutdown after snapshot, regardless of option checked (https://bugs.launchpad.net/bugs/1261022) + Version 1.0.32 * Fix bug: cron scheduled snapshots won't start with 1.0.30 diff -Nru backintime-common-1.0.32~raring/doc/README backintime-common-1.0.34~raring/doc/README --- backintime-common-1.0.32~raring/doc/README 2013-12-13 18:27:42.000000000 +0000 +++ backintime-common-1.0.34~raring/doc/README 2013-12-21 12:40:48.000000000 +0000 @@ -4,7 +4,7 @@ 1. About - Back In Time is a simple backup tool for Linux, inspired from "flyback project". + Back In Time is a simple backup tool for Linux, inspired by "flyback project". Currently there are 2 interfaces available: GNOME and KDE4. You only need to specify 3 things: * where to save snapshots @@ -44,7 +44,7 @@ 2.2. From sources Common (dependencies: python, rsync, cron, openssh-client, - python-keyring + python-keyring, python-dbus recomended: powermgmt-base, sshfs, encfs): cd common @@ -110,5 +110,5 @@ * Press OK and you will see the new actions called "Open with Back In Time" when you right-click an item -Oct 2013 +Dec 2013 diff -Nru backintime-common-1.0.32~raring/doc/VERSION backintime-common-1.0.34~raring/doc/VERSION --- backintime-common-1.0.32~raring/doc/VERSION 2013-12-13 18:27:42.000000000 +0000 +++ backintime-common-1.0.34~raring/doc/VERSION 2013-12-21 12:40:48.000000000 +0000 @@ -1 +1 @@ -1.0.32 +1.0.34 Binary files /tmp/KEmBm4pmKp/backintime-common-1.0.32~raring/man/C/backintime.1.gz and /tmp/JagOXoCx5g/backintime-common-1.0.34~raring/man/C/backintime.1.gz differ diff -Nru backintime-common-1.0.32~raring/tools.py backintime-common-1.0.34~raring/tools.py --- backintime-common-1.0.32~raring/tools.py 2013-12-13 18:27:42.000000000 +0000 +++ backintime-common-1.0.34~raring/tools.py 2013-12-21 12:40:48.000000000 +0000 @@ -608,6 +608,12 @@ line, msg = msg[:size], new_line_indicator + msg[size:] yield(line) +def syncfs(): + """writes any data buffered in memory out to disk + """ + if check_command('sync'): + return(_execute('sync') == 0) + class UniquenessSet: '''a class to check for uniqueness of snapshots of the same [item]''' def __init__(self, dc = False, follow_symlink = False, list_equal_to = False): @@ -821,8 +827,11 @@ """try to connect to the given dbus services. If successful it will return a callable dbus proxy and those arguments. """ - sessionbus = dbus.SessionBus() - systembus = dbus.SystemBus() + try: + sessionbus = dbus.SessionBus() + systembus = dbus.SystemBus() + except: + return( (None, None) ) des = self.DBUS_SHUTDOWN.keys() des.sort() for de in des: @@ -856,14 +865,18 @@ """run 'shutdown -h now' if we are root or call the dbus proxy to start the shutdown. """ + if not self.activate_shutdown: + return(False) if self.is_root: + syncfs() self.started = True proc = subprocess.Popen(['shutdown', '-h', 'now']) proc.communicate() return proc.returncode if self.proxy is None: return(False) - if self.activate_shutdown: + else: + syncfs() self.started = True return(self.proxy(*self.args))