[Galaxy Ace S5830 Android Development] iandol:
Properties and logging!!!

imbawind: the problems some people are having are most probably due to the set property limit. Please reread the g_BonE script thread, where you'll see tossan summarises the following:

http://xdaforums.com/showpost.php?p=23329559&postcount=54

You can measure your property limit easily:

getprop | wc -l

And in g_BonE's script he uses a conditional to choose how many properties to add:

if [ $(getprop | wc -l) -lt 233 ]; then
...
fi

This is harder for you as you seem to use build.prop rather than setprop, but there has to be a way to conditionally enable/disable build.prop.

LOGGING!!!

You should really be using a logging system!. You never know what your users are experiencing without logs. Please consider the following additions to your scripts, these will:

a) enable each script to log normal or verbose information.

b) it will log how many property slots are left for each script.

b) if a script causes a bootloop that script will be disabled automagically on next boot!

Add this to the top of each init.d script (after the #!/your/shell and comments but before any other commands of course):

#================================================
L="log -p i -t ADRENALINE"
self=$(basename $(readlink -nf $0))
if [ -e /data/debugon ]; then
LOG=/data/debug.log
echo "========================================" >> $LOG
echo "$self Script starting @ $(date "+%d/%m/%Y %H:%M:%S")" >> $LOG
echo "Build: $(getprop ro.build.version.release)" >> $LOG
echo "Mod: $(getprop ro.modversion)" >> $LOG
echo "Property #: $(getprop | wc -l)"
echo "Kernel: $(uname -r)" >> $LOG
exec >> $LOG 2>&1
if [ $(grep "verbose" /data/debugon | wc -l) -gt 0 ]; then
set -x
fi
fi
if [ -s /data/recoverlog ]; then
#we test if recoverlog has same name as this script
if [ $(grep $self /data/recoverlog | wc -l) -gt 0 ]; then
$L "Script errored out last time --- STOPPING SCRIPT!"
sync
sleep 1
exit
else
$L "Script was OK last boot, append $self to log..."
echo $self >> /data/recoverlog
fi
else
echo $self > /data/recoverlog
$L "$self bootloop Recovery file created..."
fi
$L "$self Script starting @ $(date "+%d/%m/%Y %H:%M:%S")"
#================================================

AND this at the end of your scripts:

#================================================
if [ -s /data/recoverlog ]; then
$L "Script ran fine; recovery file: $self removed..."
sed -i -e "/$self/d" /data/recoverlog #remove name from recoverlog
fi
$L "$self Script ending @ $(date "+%d/%m/%Y %H:%M:%S")"
#================================================

To enable logging, you create (touch or echo) the file /data/debugon -- AND you can easily make a debug enabled CWM ZIP by adding this simple script to your zip and running via edify command run_program(/system/etc/enabledebug):

#!/system/bin/sh
# this script is called /system/etc/enabledebug
echo "yes" > /data/debugon

You then simply make your CWM package with run_program(/system/etc/enabledebug) commented out for normal release and uncommented for debug version. That means you can easily release normal and debug versions so users who have problems can install the debug version then post the debug.log, with the added advantage that if the error is in an init.d script, just rebooting will inactivate that script without having to uninstall adrenaline.