socsvn commit: r254625 - soc2013/jmuniz/PackageKit-Setter

jmuniz at jmuniz at
Thu Jul 11 13:56:52 UTC 2013

Author: jmuniz
Date: Thu Jul 11 13:56:52 2013
New Revision: 254625

  Corrected the usage of the sed command, fixing the bug that wiped out the configuration file when it should have updated it.


Modified: soc2013/jmuniz/PackageKit-Setter/pk-setter
--- soc2013/jmuniz/PackageKit-Setter/pk-setter	Thu Jul 11 12:53:13 2013	(r254624)
+++ soc2013/jmuniz/PackageKit-Setter/pk-setter	Thu Jul 11 13:56:52 2013	(r254625)
@@ -92,7 +92,7 @@
         # Ask PackageKit to quietly close as soon as it can
         gdbus call --system --dest org.freedestop.PackageKit --object-path /org/freedestop/PackageKit --method org.freedestop.PackageKit.SuggestDaemonQuit >/dev/null
         # Find the first instance of "DefaultBackend" in the configuration file and edit it
-        sed "s/DefaultBackend=.*/DefaultBackend=$2/" ${PK_PREFIX}etc/PackageKit/PackageKit.conf > ${PK_PREFIX}etc/PackageKit/PackageKit.conf
+        sed -i .old "s/DefaultBackend=.*/DefaultBackend=$2/" ${PK_PREFIX}etc/PackageKit/PackageKit.conf
         # Sync the disks to make sure the configuration file is updated
         # Silently start PackageKit

More information about the svn-soc-all mailing list