packages: rc-scripts-user/userscripts - use run-fast-or-hide wrapper

sparky sparky at pld-linux.org
Mon Jan 31 19:28:45 CET 2011


Author: sparky                       Date: Mon Jan 31 18:28:45 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- use run-fast-or-hide wrapper

---- Files affected:
packages/rc-scripts-user:
   userscripts (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: packages/rc-scripts-user/userscripts
diff -u packages/rc-scripts-user/userscripts:1.1 packages/rc-scripts-user/userscripts:1.2
--- packages/rc-scripts-user/userscripts:1.1	Mon Jan 31 02:21:52 2011
+++ packages/rc-scripts-user/userscripts	Mon Jan 31 19:28:40 2011
@@ -70,8 +70,14 @@
 		for script in "$home/$scripts_dir"/*; do
 
 			# skip backups
-			[[ $script == *~ ]] && continue
-			[[ $script == *.bak ]] && continue
+			case $script in
+				*~)
+					continue
+					;;
+				*.bak)
+					continue
+					;;
+			esac
 
 			show "Running %s %s as %s" "$script" "$action" "$user"
 			busy
@@ -81,10 +87,15 @@
 				continue
 			fi
 
-			nice -n "$NICE" su - "$user" "$script" "$action" > /dev/null 2>&1 &
-			ok
-
-			: $((SCRIPTS_RUN++))
+			/sbin/run-fast-or-hide -n "$NICE" -u "$user" -- "$script" "$action"
+			local RET=$?
+			deltext
+			if [ $RET -eq 250 ]; then
+				progress "WORKING"; echo
+				: $((SCRIPTS_RUN++))
+			else
+				[ $RET -eq 0 ] && ok || fail
+			fi
 		done
 	done < /etc/passwd
 }
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/rc-scripts-user/userscripts?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list