[maemo-commits] [maemo-commits] r11971 - projects/haf/trunk/osso-af-startup/top-scripts

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Wed May 30 12:38:09 EEST 2007
Author: kihamala
Date: 2007-05-30 12:38:09 +0300 (Wed, 30 May 2007)
New Revision: 11971

Modified:
   projects/haf/trunk/osso-af-startup/top-scripts/af-services
Log:
simplified the code


Modified: projects/haf/trunk/osso-af-startup/top-scripts/af-services
===================================================================
--- projects/haf/trunk/osso-af-startup/top-scripts/af-services	2007-05-30 09:26:26 UTC (rev 11970)
+++ projects/haf/trunk/osso-af-startup/top-scripts/af-services	2007-05-30 09:38:09 UTC (rev 11971)
@@ -21,22 +21,7 @@
 # 02110-1301 USA
 
 # Exclude some UIDs from memory allocation denial.
-
-# ensure these users are protected
-TMP_UIDS=$(awk -F: '/^(messagebus|systemui|haldaemon)/{printf " " $3}' \
-           < /etc/passwd)
-
-# ensure these UIDs are protected for backwards compatibility
-TMP_UIDS="30000 30001 30002 30003 $TMP_UIDS"
-
-UIDS=""
-for n in $TMP_UIDS; do
-  echo $UIDS | grep $n > /dev/null
-  if [ $? != 0 ]; then
-    UIDS="$UIDS $n"
-  fi
-done
-
+UIDS=`getent passwd haldaemon systemui messagebus | cut -d: -f3`
 echo "Protecting UIDs $UIDS from the memory allocation denial."
 echo $UIDS > /proc/sys/vm/lowmem_allowed_uids
 


More information about the maemo-commits mailing list