-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use a script for start daemon to work around known issues
- Loading branch information
Showing
3 changed files
with
45 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/system/bin/sh | ||
|
||
exec 3<> ./start_daemon.log | ||
|
||
script_dir="$(readlink /proc/$$/cwd )" | ||
|
||
die1() { | ||
cd "$script_dir" | ||
grep -q "/cSploit" /proc/mounts && umount /cSploit | ||
test -d /cSploit && { mount -o remount,rw /; rmdir /cSploit; mount -o remount,ro / ;} | ||
echo "$1" >&3 | ||
exit 1 | ||
} | ||
|
||
test -f ./issues || { ./known-issues > ./issues 2>&3 ; chmod 777 ./issues ;} | ||
|
||
while read issue; do | ||
|
||
echo "issue #$issue found" >&3 | ||
|
||
case issue in | ||
1) | ||
if [ ! -f "/cSploit/cSploitd" ]; then | ||
mount -o remount,rw / 2>&3 || die1 "remount rw failed" | ||
mkdir /cSploit 2>&3 || die1 "mkdir failed" | ||
mount -o bind "$script_dir" "/cSploit" 2>&3 || die1 "bind failed" | ||
mount -o remount,ro / 2>&3 || echo "remount ro failed" >&3 | ||
fi | ||
cd /cSploit 2>&3 || die1 "chdir failed" | ||
;; | ||
|
||
esac | ||
done < ./issues | ||
|
||
exec 3>&- | ||
|
||
exec ./cSploitd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters