#!/bin/sh ############################################################################## # # # prerun.normal, (C) 2007-2010 S. Georgaras # # # # This file is part of Clonezilla-SysRescCD. # # # # Clonezilla-SysRescCD is free software: you can redistribute it and/or # # modify it under the terms of the GNU General Public License as published # # by the Free Software Foundation, either version 2 of the License, or # # (at your option) any later version. # # # # Clonezilla-SysRescCD is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public License along # # with Clonezilla-SysRescCD. If not, see . # # # ############################################################################## if [ -e /root/.prerunExecuted ];then # This has to be executed only once exit fi touch /root/.prerunExecuted setterm -foreground yellow echo ' ##########################################' setterm -foreground white echo -n " Modifying .bashrc ... " echo >> /root/.bashrc echo "##########################################" >> /root/.bashrc echo "# aliases by Spiros" >> /root/.bashrc echo "##########################################" >> /root/.bashrc echo "# aliases..." >> /root/.bashrc echo "alias ls='ls --color'" >> /root/.bashrc echo "alias lf='ls -F --color'" >> /root/.bashrc echo "alias l='ls -la --color'" >> /root/.bashrc echo "##########################################" >> /root/.bashrc setterm -foreground green;echo 'done';setterm -foreground white # # replace /restorecd with $restorecdFiles # echo -n " Copying new scripts... " for script in what-cd patch-clonezilla-sysresccd continue-multi-cd reloc-img imginfo imgconvert sbminst;do cp /restorecd/"$script" /usr/bin 2>/dev/null chmod +x /usr/bin/"$script" 2>/dev/null done cp /restorecd/ocs-iso /opt/drbl/sbin cp /restorecd/cust-menu /opt/drbl/sbin chmod +x /opt/drbl/sbin/ocs-iso chmod +x /opt/drbl/sbin/cust-menu # add cust-menu execution command to zip file creation script sed '/^cust-menu -z -publisher/d' /opt/drbl/sbin/ocs-live-dev | sed '/echo "Packing the output file $output_filename..."/i\ cust-menu -z -publisher "DRBL/Clonezilla http://drbl.name http://clonezilla.org" -V "$iso_label_tag" "$ORIGINAL_INSERT_MODE"' > /opt/drbl/sbin/ocs-live-dev.tmp && mv /opt/drbl/sbin/ocs-live-dev.tmp /opt/drbl/sbin/ocs-live-dev chmod +x /opt/drbl/sbin/ocs-live-dev setterm -foreground green;echo 'done';setterm -foreground white setterm -foreground yellow echo '########################################## ' setterm -foreground white