30 lines
707 B
Bash
Executable File
30 lines
707 B
Bash
Executable File
#!/system/bin/sh
|
|
|
|
chown 1001.1001 /dev/smd1;
|
|
touch /etc/ppp/pap-secrets;
|
|
touch /etc/ppp/chap-secrets;
|
|
touch /etc/ppp/options.smd;
|
|
touch /etc/ppp/options.smd1;
|
|
touch /etc/ppp/ppp-gprs.pid;
|
|
chown 0.1001 /system/etc/ppp/*
|
|
chmod 775 /system/etc/ppp/*
|
|
chown 0.0 /system/bin/pppd;
|
|
chmod 4755 /system/bin/pppd;
|
|
#/system/bin/pppd /dev/smd1 defaultroute;
|
|
|
|
if [ -f /system/ppp ]
|
|
then
|
|
echo "PPP enabled, doing PPP specific stuff"
|
|
|
|
# Create link for resolv.conf (generated by pppd)
|
|
ln -s /etc/ppp/resolv.conf /etc/resolv.conf
|
|
|
|
# Tweak kernel low memory handling
|
|
echo 8 8 > /proc/sys/vm/lowmem_reserve_ratio
|
|
echo 8192 > /proc/sys/vm/min_free_kbytes
|
|
|
|
else
|
|
echo "PPP disbled, leaving things as they are"
|
|
fi
|
|
|