/[clonezilla-sysresccd]/trunk/create-clonezilla-sysresccd/files/prerun.normal
ViewVC logotype

Annotation of /trunk/create-clonezilla-sysresccd/files/prerun.normal

Parent Directory Parent Directory | Revision Log Revision Log


Revision 176 - (hide annotations)
Tue May 31 19:45:21 2011 UTC (12 years, 10 months ago) by sng
File size: 3406 byte(s)
- updating prerun scripts. Making them run once
- updating ocs-iso to 1.2.8-46
- minor create-clonezilla-sysresccd update

1 sng 47 #!/bin/sh
2 sng 48 ##############################################################################
3     # #
4 sng 64 # prerun.normal, (C) 2007-2010 S. Georgaras <sng@hellug.gr> #
5 sng 48 # #
6     # This file is part of Clonezilla-SysRescCD. #
7     # #
8     # Clonezilla-SysRescCD is free software: you can redistribute it and/or #
9     # modify it under the terms of the GNU General Public License as published #
10     # by the Free Software Foundation, either version 2 of the License, or #
11     # (at your option) any later version. #
12     # #
13     # Clonezilla-SysRescCD is distributed in the hope that it will be useful, #
14     # but WITHOUT ANY WARRANTY; without even the implied warranty of #
15     # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
16     # GNU General Public License for more details. #
17     # #
18     # You should have received a copy of the GNU General Public License along #
19     # with Clonezilla-SysRescCD. If not, see <http://www.gnu.org/licenses/>. #
20     # #
21     ##############################################################################
22 sng 176 if [ -e /root/.prerunExecuted ];then
23     # This has to be executed only once
24     exit
25     fi
26     touch /root/.prerunExecuted
27 sng 47 setterm -foreground yellow
28     echo '
29     ##########################################'
30     setterm -foreground white
31     echo -n " Modifying .bashrc ... "
32     echo >> /root/.bashrc
33     echo "##########################################" >> /root/.bashrc
34     echo "# aliases by Spiros" >> /root/.bashrc
35     echo "##########################################" >> /root/.bashrc
36     echo "# aliases..." >> /root/.bashrc
37     echo "alias ls='ls --color'" >> /root/.bashrc
38     echo "alias lf='ls -F --color'" >> /root/.bashrc
39     echo "alias l='ls -la --color'" >> /root/.bashrc
40     echo "##########################################" >> /root/.bashrc
41     setterm -foreground green;echo 'done';setterm -foreground white
42    
43    
44     #
45 sng 68 # replace /restorecd with $restorecdFiles
46 sng 47 #
47     echo -n " Copying new scripts... "
48 sng 64 for script in what-cd patch-clonezilla-sysresccd continue-multi-cd reloc-img imginfo imgconvert sbminst;do
49 sng 68 cp /restorecd/"$script" /usr/bin 2>/dev/null
50 sng 47 chmod +x /usr/bin/"$script" 2>/dev/null
51     done
52 sng 68 cp /restorecd/ocs-iso /opt/drbl/sbin
53     cp /restorecd/cust-menu /opt/drbl/sbin
54 sng 84 chmod +x /opt/drbl/sbin/ocs-iso
55     chmod +x /opt/drbl/sbin/cust-menu
56     # add cust-menu execution command to zip file creation script
57 sng 176 sed '/^cust-menu -z -publisher/d' /opt/drbl/sbin/ocs-live-dev | sed '/echo "Packing the output file $output_filename..."/i\
58     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
59 sng 84 chmod +x /opt/drbl/sbin/ocs-live-dev
60 sng 47 setterm -foreground green;echo 'done';setterm -foreground white
61    
62     setterm -foreground yellow
63     echo '##########################################
64     '
65     setterm -foreground white
66    

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26