View Single Post
Kieron's Avatar
Posts: 388 | Thanked: 115 times | Joined on Oct 2009 @ London, UK
#10
Saturn, thank you, although that didn't work.

I'm having this issue where I can't run the below commands in a script, for whatever reason. I'm probably doing something wrong. I can run the commands manually, after I've typed 'root', else I get 'no such file or directory' and 'does not exist' errors. Could you assist? If you need more info please don't hesistate to ask, there is some on the neopwn howto thread as I was trying to troubleshoot there to no avail.

Summerising what I said, running the script doesn't work. But if I run this command, once I've rooted, it works.

Code:
rmmod wl12xx; rmmod mac80211; rmmod cfg80211; insmod /home/user/MyDocs/neo/compat.ko; insmod /home/user/MyDocs/neo/rfkill_backport.ko; insmod /home/user/MyDocs/neo/cfg80211.ko; insmod /home/user/MyDocs/neo/mac80211.ko; insmod /home/user/MyDocs/neo/wl1251.ko; insmod /home/user/MyDocs/neo/wl1251_spi.ko
script contents, for reference:

Code:
#!/bin/sh

# gain superuser rights.

if [ `id -u` != 0 ] ; then
    exec sudo gainroot <<EOF
exec sh $0 $*
EOF
	exit $?
fi   

rmmod wl12xx
rmmod mac80211
rmmod cfg80211
insmod /home/user/MyDocs/neo/compat.ko
insmod /home/user/MyDocs/neo/rfkill_backport.ko
insmod /home/user/MyDocs/neo/cfg80211.ko
insmod /home/user/MyDocs/neo/mac80211.ko
insmod /home/user/MyDocs/neo/wl1251.ko
insmod /home/user/MyDocs/neo/wl1251_spi.ko
and the script throws this output when it fails:

Code:
: not foundh: line 2:
does not exist in /proc/modules
does not exist in /proc/modules
does not exist in /proc/modules
': No such file or directoryer/MyDocs/neo/compat.ko
': No such file or directoryer/MyDocs/neo/rfkill_backport.ko
': No such file or directoryer/MyDocs/neo/cfg80211.ko
': No such file or directoryer/MyDocs/neo/mac80211.ko
': No such file or directoryer/MyDocs/neo/wl1251.ko
insmod: error inserting '/home/user/MyDocs/neo/wl1251_spi.ko': -1 Unknown symbol in module
for reference, the permissions of the files are:
Code:
-rwxr-xr-x 1 root staff
again, running the command manually works fine.

there is probably some fundamental flaw the in way im doing things, i just cant seem to figure it. hope you can help.

Thanks again.
K

Last edited by Kieron; 2010-11-08 at 23:18.