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

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Wed Jul 16 14:32:10 EEST 2008
Author: schulhof
Date: 2008-07-16 14:32:00 +0300 (Wed, 16 Jul 2008)
New Revision: 15786

Modified:
   projects/haf/trunk/osso-app-killer/debian/changelog
   projects/haf/trunk/osso-app-killer/src/osso-app-killer-common.sh
   projects/haf/trunk/osso-app-killer/src/osso-app-killer-cud.sh
   projects/haf/trunk/osso-app-killer/src/osso-app-killer-restore.sh
   projects/haf/trunk/osso-app-killer/src/osso-clean-mmc.sh
Log:
  * Replace all the other rootchecks as well


Modified: projects/haf/trunk/osso-app-killer/debian/changelog
===================================================================
--- projects/haf/trunk/osso-app-killer/debian/changelog	2008-07-16 07:33:41 UTC (rev 15785)
+++ projects/haf/trunk/osso-app-killer/debian/changelog	2008-07-16 11:32:00 UTC (rev 15786)
@@ -1,3 +1,9 @@
+osso-app-killer (1.22-1) unstable; urgency=low
+
+  * Replace all the other rootchecks as well
+
+ -- Gabriel Schulhof <gabriel.schulhof at nokia.com>  Thu, 10 Jul 2008 18:25:56 +0300
+
 osso-app-killer (1.21-1) unstable; urgency=low
 
   * Need to use $(id -u) -eq 0 to check for root, rather than "x$USER" = "xroot"

Modified: projects/haf/trunk/osso-app-killer/src/osso-app-killer-common.sh
===================================================================
--- projects/haf/trunk/osso-app-killer/src/osso-app-killer-common.sh	2008-07-16 07:33:41 UTC (rev 15785)
+++ projects/haf/trunk/osso-app-killer/src/osso-app-killer-common.sh	2008-07-16 11:32:00 UTC (rev 15786)
@@ -37,7 +37,7 @@
   # restore the original language
   cat $DEFAULT_LOCALE_DIR/locale.orig > $DIR/locale
   USER=`whoami`
-  if [ "x$USER" = "xroot" ]; then
+  if test $(id -u) -eq 0; then
     chown user:users $DIR/locale
   fi
 fi

Modified: projects/haf/trunk/osso-app-killer/src/osso-app-killer-cud.sh
===================================================================
--- projects/haf/trunk/osso-app-killer/src/osso-app-killer-cud.sh	2008-07-16 07:33:41 UTC (rev 15785)
+++ projects/haf/trunk/osso-app-killer/src/osso-app-killer-cud.sh	2008-07-16 11:32:00 UTC (rev 15786)
@@ -26,7 +26,7 @@
 export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11'
 USER=`whoami`
 
-if [ "x$USER" = "xroot" ]; then
+if test $(id -u) -eq 0; then
   SUDO=''
   HOME=$DEFHOME
   echo "$0: Warning, I'm root"
@@ -112,7 +112,7 @@
 # re-create first boot flags
 touch $HOME/.suw_first_run
 touch $HOME/first-boot-flag
-if [ "x$USER" = "xroot" ]; then
+if test $(id -u) -eq 0; then
   chown user.users $HOME/.suw_first_run
   chown user.users $HOME/first-boot-flag
 fi

Modified: projects/haf/trunk/osso-app-killer/src/osso-app-killer-restore.sh
===================================================================
--- projects/haf/trunk/osso-app-killer/src/osso-app-killer-restore.sh	2008-07-16 07:33:41 UTC (rev 15785)
+++ projects/haf/trunk/osso-app-killer/src/osso-app-killer-restore.sh	2008-07-16 11:32:00 UTC (rev 15786)
@@ -21,7 +21,7 @@
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 # 02110-1301 USA
 
-if [ "x$USER" = "xroot" ]; then
+if test $(id -u) -eq 0; then
   echo "$0: Error, I'm root"
   exit 1
 fi

Modified: projects/haf/trunk/osso-app-killer/src/osso-clean-mmc.sh
===================================================================
--- projects/haf/trunk/osso-app-killer/src/osso-clean-mmc.sh	2008-07-16 07:33:41 UTC (rev 15785)
+++ projects/haf/trunk/osso-app-killer/src/osso-clean-mmc.sh	2008-07-16 11:32:00 UTC (rev 15786)
@@ -1,7 +1,7 @@
 #!/bin/sh
 set +e
 
-if [ "x$USER" = "xroot" ]; then
+if test $(id -u) -eq 0; then
   SUDO=''
   echo "$0: Warning, I'm root"
 else


More information about the maemo-commits mailing list