SlimRoms / device_samsung_crespo

device_samsung_crespo
1 stars 4 forks source link

bashisms in POSIX/shell scripts #1

Open weedy opened 11 years ago

weedy commented 11 years ago

I don't know if this effects all slimroms or is a specific NS tweak, but it's been in every version since I migrated to slim.

Everywhere you guys source /system/etc/liberty.bsh you specify either #!/system/xbin/{sh,ash}, or #!/system/xbin/busybox {sh,ash}. This will and does fail horribly because your trying to use a POSIX shell to process bash script.

Change it to #!/system/xbin/bash or make /system/etc/liberty.bsh POSIX compatible.

mnm9994u commented 11 years ago

ash is a symlink to busybox executable.

weedy commented 11 years ago

That doesn't matter AT ALL for the purpose of this bug.

weedy commented 11 years ago

Another thing that you guys will notice when you fix this. The values you have chosen are terrible for this device.

echo "1" > /proc/sys/vm/oom_kill_allocating_task;
echo "70" > /proc/sys/vm/dirty_background_ratio;
echo "90" > /proc/sys/vm/dirty_ratio;
echo "5" > /proc/sys/vm/vfs_cache_pressure;

These being especially bad. But again, once the bug is fixed and the scripts run to completions you will notice the change quickly.