#!/bin/bash
###echo "----- ----- ----- -----"
###echo "fdisk -l before:"
###fdisk -l 
###echo "----- ----- ----- -----"
# do some work here 
echo "Doing the PARTITIONS recovery"
echo "----- ----- ----- -----"
# use file conf/lenovo.sfdisk-d.txt
# consult file for operator file conf/lenovo.fdisk-l.txt
echo "cd /var/tmp/"
cd /var/tmp/
# FQDN will work here? or need IP
#wget http://pcfs1.ictp.it/pub/systemrescuecd/bootscripts/conf/lenovo.sfdisk-d.txt
#wget http://pcfs1.ictp.it/pub/systemrescuecd/bootscripts/conf/lenovo.fdisk-l.txt
wget http://140.105.16.200/pub/systemrescuecd/bootscripts/conf/lenovo.sfdisk-d.txt
wget http://140.105.16.200/pub/systemrescuecd/bootscripts/conf/lenovo.fdisk-l.txt
echo "sfdisk /dev/sda < lenovo.sfdisk-d.txt "
sfdisk /dev/sda < lenovo.sfdisk-d.txt
#
###echo "----- ----- ----- -----"
###echo "fdisk -l after:"
###fdisk -l 
echo "----- ----- ----- -----"
echo "logs in /var/autorun/log/, scripts in /var/autorun/tmp/"
echo "----- ----- ----- -----"
exit  0
