Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Init.d script #136

Closed
Blocked opened this issue May 9, 2013 · 3 comments
Closed

Init.d script #136

Blocked opened this issue May 9, 2013 · 3 comments

Comments

@Blocked
Copy link

Blocked commented May 9, 2013

Init.d scripts are not executed at boot properly.

Init d script here:

!/system/bin/sh

if [ -e /data/data/dev.ukanth.ufirewall/app_bin/iptables_armv5 ]; then
path="dev.ukanth.ufirewall"
elif [ -e /data/data/dev.ukanth.ufirewall.donate/app_bin/iptables_armv5 ]; then
path="dev.ukanth.ufirewall.donate"
else
log -p i -t afwall "AFWall doesn't seem to be installed."
exit
fi;

/data/data/$path/app_bin/iptables_armv5 -P INPUT DROP
/data/data/$path/app_bin/iptables_armv5 -P OUTPUT DROP
/data/data/$path/app_bin/iptables_armv5 -P FORWARD DROP

Executed in fx file manager, output gives

Process output: /etc/init.d/afwallstart
Exit status: 1
[No Output]
Error Output:

/etc/init.d/afwallstart: line 2:
: command not found
/etc/init.d/afwallstart: line 5: syntax error near unexpected token elif' /etc/init.d/afwallstart: line 5:elif [ -e /data/data/dev.ukanth.ufirewall.donate/app_bin/iptables_armv5 ]; then
'
-about carriage returns being inserted when the original afwallstart (res/raw/afwallstart) contains none-
HTC explorer a310e
Cyanogen jb

@ukanth
Copy link
Owner

ukanth commented May 10, 2013

Can you please try this in your linux box and push it back to /etc/init.d using adb ?

cat afwallstart | sed '/\015/d' > afwallstart_fix

@Blocked
Copy link
Author

Blocked commented May 10, 2013

Thanks for the reply. I don't have access to my PC for quite some time now. Anyway, since android has cat binary -did the same thing in terminal emulator - I got same file as afwallstartfix with same output

Process output: /etc/init.d/afwallstart_fix
Exit status: 1
[No Output]
Error Output:

/etc/init.d/afwallstart_fix: line 2:
: command not found
/etc/init.d/afwallstart_fix: line 5: syntax error near unexpected token elif' /etc/init.d/afwallstart_fix: line 5:elif [ -e /data/data/dev.ukanth.ufirewall.donate/app_bin/iptables_armv5 ]; then
'
Please also look into xda.I'm posting for banned.

@Blocked
Copy link
Author

Blocked commented May 10, 2013

Not interested anymore.I'm really sorry for your time. Developer or anyone interested can open this issue, if they're interested. I personally don't see the point, since xda member banned already has issues with normal iptables script-being overwritten after boot . So, even if this was a problem, fixing it won't be of any use. Thankyou for understanding.
CLOSED BY BLOCKED.

@Blocked Blocked closed this as completed May 10, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants