Added plugscripts and the fixroot.sh script

This commit is contained in:
Mike Staszel 2010-07-07 18:49:07 -07:00
parent 6e88facc72
commit f6d0c0596b
2 changed files with 47 additions and 0 deletions

View file

@ -0,0 +1,3 @@
==== ./scripts/plugscripts/ ====
This folder contains scripts that should be run on a user's device,
post-install.

44
scripts/plugscripts/fixroot.sh Executable file
View file

@ -0,0 +1,44 @@
#!/bin/sh
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root." 1>&2
exit 1
fi
echo "This script will fix fstab for you so that tools like df work correctly."
echo ""
echo ""
echo "Please select your root device from the list below:"
showMenu () {
echo "1) NAND"
echo "2) SD"
echo "3) USB"
echo "4) Exit"
}
showMenu
read CHOICE
case "$CHOICE" in
"1"|"NAND")
echo "ubi0:rootfs / ubifs defaults,noatime 0 0" >> /etc/fstab
;;
"2"|"SD")
echo "/dev/mmcblk0p1 / ext2 defaults,noatime 0 0" >> /etc/fstab
;;
"3"|"USB")
echo "/dev/sda1 / ext2 defaults,noatime 0 0" >> /etc/fstab
;;
"4"|"Exit")
exit
;;
esac
clear
echo "Below is the new fstab, check it before rebooting!"
echo ""
echo ""
echo ""
echo ""
cat /etc/fstab