#!/bin/bash
# Author: Steven Shiau <steven _at_ nchc org tw>
# License: GPL

# Append the PATH in system.
sudo echo "export PATH=/opt/drbl/sbin:/opt/drbl/bin:\$PATH" >> /etc/profile
sudo echo "export PATH=/opt/drbl/sbin:/opt/drbl/bin:\$PATH" >> /etc/bash.bashrc
# Clean /etc/motd to avoid the following message is missing.
sudo echo "" > /etc/motd
# Prepare the program.
sudo ln -fs /live_media/opt/drbl /opt/drbl
sudo mkdir -p /home/partimag
# Show prompt
echo "****************************************************************"
echo "To use clonezilla to save an image:"
echo "0. Run \"sudo su -\" to become root."
echo "1. You have to prepare a device, and mount it as /home/partimag."
echo "   Ex. If you want to use clonezilla to save /dev/hda, and put the image in /dev/hdb1. Then you have to mount /dev/hdb1 as /home/partimag by:"
echo "       mount /dev/hdb1 /home/partimag"
echo "2. Then run"
echo "       ocs-sr -x"
echo "   Or"
echo "       ocs-sr -l en -p choose -x"
echo "If you want to use other mount point to put the image, such as /media/usb, you can run ocs-sr like this:"
echo "       ocs-sr --ocsroot /media/usb -x"
echo "****************************************************************"
