summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.rst2
-rw-r--r--reinstall-recovery/recovery.sh76
-rwxr-xr-xupdate-tool/cronjob-for-check-updates.sh2
3 files changed, 46 insertions, 34 deletions
diff --git a/README.rst b/README.rst
index 01bec66..01dff24 100644
--- a/README.rst
+++ b/README.rst
@@ -5,7 +5,7 @@ What it contains
----------------
Custom applications for FOSSEE-OS.
-[http://netbook.fossee.in]
+[http://laptop.fossee.in]
These tools are essentially simple bash scripts using zenity/dialog/easybashgui/notify-send
for UI interactions.
diff --git a/reinstall-recovery/recovery.sh b/reinstall-recovery/recovery.sh
index 2131c95..ed7983a 100644
--- a/reinstall-recovery/recovery.sh
+++ b/reinstall-recovery/recovery.sh
@@ -11,7 +11,7 @@ ramdisk_image=/sd_card/initrd.img
#This is the recovery script used to re-install or recover the FOSSEE-OS.
-#This is initial function which is called, also this is the first screen that comes up in this process.
+#This is the initial function which is called, also this is the first screen that comes up in this process.
#Seq-1
image()
{
@@ -79,43 +79,55 @@ fi
installation()
{
-
- echo ""
- echo ""
- echo -e "\t\tThe installation is underway, do not exit..."
- # exit 0
- mkdir $ubuntu_dir
+ #Detect the no. of partitions on the SD Card.
+ #If it contains a single partition, then continue, otherwise copy the contents of ext4 to nand_previous.
+ echo ""
+ echo ""
+ echo -e "\t\tThe installation is underway, do not exit..."
+ # exit 0
+ mkdir $ubuntu_dir
+
+ # This part is taken care of in lib/debian-installer/menu file.
+ # mkdir /sd_card
+ # mount /dev/mmcblk0p1 /sd_card
- mkdir /sd_card
- mount /dev/mmcblk0p1 /sd_card
+ if [ $(echo $?) -eq 0 ]; then
+ flash_erase $rootfs_part 0 0 > /dev/null
+ else
+ echo -e"\t\tSD card not mounted"
+ sleep 3
+ exit 0
+ fi
+ ubiattach /dev/ubi_ctrl -m $rootfs_mtd_num > /dev/null
+ ubimkvol /dev/ubi0 -N ubuntu-rootfs -m > /dev/null
+ if [ $(echo $?) -eq 0 ]; then
+ mount -t ubifs ubi0_0 $ubuntu_dir
+ else
+ echo -e "\t\tubimkvol failed"
+ sleep 3
+ exit 0
+ fi
+ #Insert progress bar here.
+ #Check the no. of partitions on the SD card. 1?regular-backup!incremental-backup.
- if [ $(echo $?) -eq 0 ]; then
- flash_erase $rootfs_part 0 0 > /dev/null
- else
- echo -e"\t\tSD card not mounted"
- sleep 3
- exit 0
- fi
- ubiattach /dev/ubi_ctrl -m $rootfs_mtd_num > /dev/null
- ubimkvol /dev/ubi0 -N ubuntu-rootfs -m > /dev/null
- if [ $(echo $?) -eq 0 ]; then
- mount -t ubifs ubi0_0 $ubuntu_dir
- else
- echo -e "\t\tubimkvol failed"
- sleep 3
- exit 0
- fi
- #Insert progress bar here.
- sh /mnt/bar /sd_card/fossee-os.tar.gz | tar xzpf - -C /nand_previous
- sync
+ part_no_two=$(ls /dev/mmcblk0*)
+ part_no_two=$(echo $part_no_two | cut -d' ' -f3) #Check for the second partition on the SD card.
+ if [ "$part_no_two" == "" ]; then
+ sh /mnt/bar /sd_card/fossee-os.tar.gz | tar xzpf - -C /nand_previous
+ sync
+ else
+ mount /dev/mmcblk0p2 /tmp
+ cp -a /tmp /nand_previous
+ umount /dev/mmcblk0p2
+ fi
- umount $ubuntu_dir
+ umount $ubuntu_dir
# /bin/sh
echo ""
echo -e "\t\tInstallation complete."
sleep 2
echo ""
- umount /dev/mmcblk0p1
+ #umount /dev/mmcblk0p1
printf "\t\tPress ENTER to restart.[ Please remove the SD card first ]"
read read_restart
if $read_restart; then
@@ -136,8 +148,8 @@ echo ""
echo ""
echo -e "\t\tTrying to access previous installation"
printf "\t\tMounting SD card"
-mkdir /sd_card
-mount /dev/mmcblk0p1 /sd_card
+#mkdir /sd_card
+#mount /dev/mmcblk0p1 /sd_card
for i in `seq 1 2`
do
printf "."
diff --git a/update-tool/cronjob-for-check-updates.sh b/update-tool/cronjob-for-check-updates.sh
index 53d5e85..eaf2c3a 100755
--- a/update-tool/cronjob-for-check-updates.sh
+++ b/update-tool/cronjob-for-check-updates.sh
@@ -15,7 +15,7 @@ return_text=$(git fetch --tags --dry-run 2>&1)
# Check for return code, it will be 0 if internet is available
[ $? -eq 0 ] && [ $(echo $return_text|wc -l) -ge 1 ] && \
-sudo -u $user /usr/bin/notify-send -i "path/to//opt/FOSSEE-netbook-tools/update-tool/patcher.png" \
+sudo -u $user /usr/bin/notify-send -i "/opt/FOSSEE-netbook-tools/update-tool/patcher.png" \
"FOSSEE Updates available" \
"menu -> FOSSEE-Tools -> FOSSEE-updates"