[maemo-commits] [maemo-commits] r14164 - in projects/haf/trunk/osso-app-killer: . debian src

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Fri Sep 28 14:25:56 EEST 2007
Author: kihamala
Date: 2007-09-28 14:25:53 +0300 (Fri, 28 Sep 2007)
New Revision: 14164

Added:
   projects/haf/trunk/osso-app-killer/osso-app-killer.sudoers
   projects/haf/trunk/osso-app-killer/src/osso-clean-mmc.sh
Modified:
   projects/haf/trunk/osso-app-killer/debian/changelog
   projects/haf/trunk/osso-app-killer/debian/osso-app-killer.install
   projects/haf/trunk/osso-app-killer/debian/postinst
   projects/haf/trunk/osso-app-killer/src/gconf-clean.sh
Log:
a big bunch of good changes


Modified: projects/haf/trunk/osso-app-killer/debian/changelog
===================================================================
--- projects/haf/trunk/osso-app-killer/debian/changelog	2007-09-28 10:38:22 UTC (rev 14163)
+++ projects/haf/trunk/osso-app-killer/debian/changelog	2007-09-28 11:25:53 UTC (rev 14164)
@@ -4,6 +4,11 @@
   * Spare 'system/bluetooth' GConf keys in ROS. Fixes: NB#59060
   * Use 'cat' instead of 'cp' to restore the locale file, avoiding the busybox
     strangeness.
+  * Do not remove xml files, just empty them (avoids a problem when there
+    is a subdirectory).
+  * Added osso-clean-mmc.sh.
+  * Added osso-app-killer.sudoers file with some new entries for formatting
+    a memory card.
 
  -- Kimmo Hämäläinen <kimmo.hamalainen at nokia.com>  Mon, 24 Sep 2007 16:34:54 +0300
 

Modified: projects/haf/trunk/osso-app-killer/debian/osso-app-killer.install
===================================================================
--- projects/haf/trunk/osso-app-killer/debian/osso-app-killer.install	2007-09-28 10:38:22 UTC (rev 14163)
+++ projects/haf/trunk/osso-app-killer/debian/osso-app-killer.install	2007-09-28 11:25:53 UTC (rev 14164)
@@ -1 +1,2 @@
 *.sh /usr/sbin
+osso-app-killer.sudoers /etc/sudoers.d

Modified: projects/haf/trunk/osso-app-killer/debian/postinst
===================================================================
--- projects/haf/trunk/osso-app-killer/debian/postinst	2007-09-28 10:38:22 UTC (rev 14163)
+++ projects/haf/trunk/osso-app-killer/debian/postinst	2007-09-28 11:25:53 UTC (rev 14164)
@@ -49,6 +49,10 @@
     ;;
 esac
 
+if [ -x /usr/sbin/update-sudoers ]; then
+        /usr/sbin/update-sudoers
+fi
+
 # dh_installdeb will replace this with shell code automatically
 # generated by other debhelper scripts.
 

Added: projects/haf/trunk/osso-app-killer/osso-app-killer.sudoers
===================================================================
--- projects/haf/trunk/osso-app-killer/osso-app-killer.sudoers	2007-09-28 10:38:22 UTC (rev 14163)
+++ projects/haf/trunk/osso-app-killer/osso-app-killer.sudoers	2007-09-28 11:25:53 UTC (rev 14164)
@@ -0,0 +1,4 @@
+user ALL = NOPASSWD: umount /media/mmc2 
+user ALL = NOPASSWD: /usr/sbin/osso-prepare-partition.sh *
+user ALL = NOPASSWD: mkdosfs *
+

Modified: projects/haf/trunk/osso-app-killer/src/gconf-clean.sh
===================================================================
--- projects/haf/trunk/osso-app-killer/src/gconf-clean.sh	2007-09-28 10:38:22 UTC (rev 14163)
+++ projects/haf/trunk/osso-app-killer/src/gconf-clean.sh	2007-09-28 11:25:53 UTC (rev 14164)
@@ -19,6 +19,13 @@
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 # 02110-1301 USA
 
+empty_file()
+{
+  rm -f $1
+  touch $1
+  chmod ugo+rw $1
+}
+
 cd /etc/osso-af-init/gconf-dir
 if [ $? = 0 ]; then
   for d in `ls`; do
@@ -29,7 +36,7 @@
       if [ "x$CUD" != "x" ]; then
         for f in `find system -name *.xml`; do
           echo "$0: removing $f"
-          rm -f $f
+          empty_file $f
         done
         continue
       elif [ "x$CUD" = "x" ]; then
@@ -40,7 +47,7 @@
             continue
           fi
           echo "$0: removing $f"
-          rm -f $f
+          empty_file $f
         done
         continue
       fi
@@ -54,7 +61,7 @@
             continue
           fi
           echo "$0: removing $f"
-          rm -f $f
+          empty_file $f
         done
         continue
       fi

Added: projects/haf/trunk/osso-app-killer/src/osso-clean-mmc.sh
===================================================================
--- projects/haf/trunk/osso-app-killer/src/osso-clean-mmc.sh	2007-09-28 10:38:22 UTC (rev 14163)
+++ projects/haf/trunk/osso-app-killer/src/osso-clean-mmc.sh	2007-09-28 11:25:53 UTC (rev 14164)
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+DEV=''
+HOST=`hal-find-by-property --key mmc_host.slot_name --string internal`
+if [ $? = 0 ]; then
+  RCA=`hal-find-by-property --key info.parent --string $HOST`
+  if [ $? = 0 ]; then
+    STOR=`hal-find-by-property --key info.parent --string $RCA`
+    if [ $? = 0 ]; then
+      TMP=`hal-get-property --udi $STOR --key block.device`
+      if [ $? = 0 ]; then
+        DEV=$TMP
+      fi
+    fi
+  fi
+fi
+if [ "x$DEV" != "x" ]; then
+  echo "Internal memory card device is $DEV"
+  sudo umount /media/mmc2
+  if [ $? = 0 ]; then
+    sudo /usr/sbin/osso-prepare-partition.sh $DEV
+    if [ $? = 0 ]; then
+      sudo mkdosfs "${DEV}p1"
+    fi
+  fi
+else
+  echo "Could not find out internal memory card device"
+fi


Property changes on: projects/haf/trunk/osso-app-killer/src/osso-clean-mmc.sh
___________________________________________________________________
Name: svn:executable
   + *


More information about the maemo-commits mailing list