Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- # Simple scripts useful when adding debian to a cyanogenmod rom, or possibly any other rooted, android phone.
- #
- ===== 25mount_ext =====
- #!/system/bin/sh
- #
- # /system/etc/init.d/25mount_ext
- #
- #
- # Michael "Ryo-ohki" Cheselka
- # cheselka@gmail.com
- # 2010-07-16
- #
- if [ ! -d /mnt/sd-ext ] ;
- then
- mount -o remount,rw / ;
- mkdir /mnt/sd-ext ;
- chmod o-w /mnt/sd-ext ;
- [ ! -h /sd-ext ] && ln -s /mnt/sd-ext /sd-ext ;
- mount -o remount,ro / ;
- fi ;
- mount -t ext2 /dev/block/vold/179:3 /mnt/sd-ext ;
- ===== 30swapon =====
- #!/system/bin/sh
- #
- # /system/etc/init.d/30swapon
- #
- #
- # Michael "Ryo-ohki" Cheselka
- # cheselka@gmail.com
- # 2010-07-16
- #
- #
- # swapon /dev/block/mmcblk0p2 ( linux /dev/sdb2)
- #
- swapon /dev/block/mmcblk0p2 ;
- sysctl -w vm.swappiness=10 ;
- ===== toggle_sshd =====
- #!/system/bin/sh
- #
- # /system/bin/toggle_sshd
- # /sdcard/ase/scripts/toggle_sshd.sh
- #
- #
- # Michael "Ryo-ohki" Cheselka
- # cheselka@gmail.com
- # 2010-07-16
- #
- export HOME=/root
- export PATH="/sbin:/system/sbin:/system/bin:/system/xbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin"
- export TERM=linux
- if [ $( pgrep -f /usr/sbin/sshd ) ] ; then
- chroot /sd-ext/debian /etc/init.d/ssh stop ;
- umount /sd-ext/debian/sdcard /sd-ext/debian/data /sd-ext/debian/sys /sd-ext/debian/dev/pts /sd-ext/debian/proc ;
- sysctl -w net.ipv4.ip_forward=0 ;
- else
- mount -o bind /sdcard /sd-ext/debian/sdcard ;
- mount -o bind /data /sd-ext/debian/data ;
- mount -t sysfs sysfs /sd-ext/debian/sys ;
- mount -t devpts devpts /sd-ext/debian/dev/pts ;
- mount -t proc proc /sd-ext/debian/proc ;
- sysctl -w net.ipv4.ip_forward=1 ;
- chroot /sd-ext/debian /etc/init.d/ssh start ;
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement