Subversion Repositories livecd

Rev

Rev 119 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 119 Rev 125
Line 88... Line 88...
88
            usage;;
88
            usage;;
89
    esac
89
    esac
90
 
90
 
91
done
91
done
92
 
92
 
-
 
93
### check if I run inside my directory
-
 
94
if [ ! -x $( basename $0 ) ]; then
-
 
95
    echo "Please run $( basename $0 ) within its directory"
-
 
96
    exit 1
-
 
97
fi
93
 
98
 
94
### source livecd.conf
99
### source livecd.conf
95
. livecd.conf
100
. livecd.conf
96
 
101
 
97
### test input
102
### test input
98
[ ! $SL ] && usage 
103
[ ! $SL ] && usage 
99
 
104
 
100
### print warning, if not in chroot
105
### show warning, if not in chroot
101
mounts=$( mount 2>/dev/null | grep -v proc )
106
mounts=$( mount 2>/dev/null | grep -v proc )
102
if [ "$mounts" != "" ]; then
107
if [ "$mounts" != "" ]; then
103
    echo; echo "It seems that you do not build in chroot."
108
    echo; echo "It seems that you do not build in chroot."
104
    echo -n "Do you really want to continue (y/N)? "
109
    echo -n "Do you really want to continue (y/N)? "
105
    read -n 1 key
110
    read -n 1 key
106
    [ "$key" != "y" ] && exit
111
    [ "$key" != "y" ] && exit
107
fi
112
fi
108
 
113
 
109
### do not run without psi option on a PSI installation
114
### do not run without psi option on a PSI installation
110
if [ -e /etc/sysconfig/cfengine ] && [ ! $PSI ]; then
115
if [ -e /etc/sysconfig/psi ] && [ ! $PSI ]; then
111
    echo "I guess this is a PSI installation, please use option '-psi'"; echo
116
    echo "I guess this is a PSI installation, please use option '-psi'"; echo
112
    exit
117
    exit
113
fi
118
fi
114
 
119
 
115
### check if I run inside my directory
-
 
116
if [ ! -x $( basename $0 ) ]; then
-
 
117
    echo "Please run $( basename $0 ) within its directory"
-
 
118
    exit 1
-
 
119
fi
-
 
120
 
-
 
121
### add extra boot options
120
### add extra boot options
122
BOOT_OPTIONS="$BOOT_OPTIONS $EXTRA_BOOT_OPTIONS"
121
BOOT_OPTIONS="$BOOT_OPTIONS $EXTRA_BOOT_OPTIONS"
123
 
122
 
124
### add option "psi" for PSI
123
### add option "psi" for PSI
125
[ $PSI ] && BOOT_OPTIONS="psi $BOOT_OPTIONS"
124
[ $PSI ] && BOOT_OPTIONS="psi $BOOT_OPTIONS"
Line 146... Line 145...
146
 
145
 
147
### display summary
146
### display summary
148
### -----------------------------------------------------------
147
### -----------------------------------------------------------
149
 
148
 
150
echo; echo "--------------------------------------------"
149
echo; echo "--------------------------------------------"
151
if [ $DVD ]; then 
150
[ $DVD ]                  && echo "Build of LiveDVD started"
152
    echo "Build of LiveDVD started"
151
[ $MINI ]                 && echo "Build of MINI LiveCD started"
153
else
-
 
154
    echo "Build of LiveCD started"
152
[ ! $DVD ] && [ ! $MINI ] && echo "Build of LiveCD started"
155
fi
-
 
156
echo "Script version:      $SCRIPT_VERSION"
153
echo "Script version:      $SCRIPT_VERSION"
157
echo "Kernel version:      $KERNEL"
154
echo "Kernel version:      $KERNEL"
158
[ $SMP ] && echo "SMP Kernel version:  ${KERNEL}smp"
155
[ $SMP ] && echo "SMP Kernel version:  ${KERNEL}smp"
159
echo "--------------------------------------------"
156
echo "--------------------------------------------"
160
 
157
 
161
[ $PSI ]  && echo "**** Build for PSI ****"
158
[ $PSI ]  && echo "**** Build for PSI ****"
162
[ "$OS_RELEASE" = "4" ]   && echo "**** Build for SL4 ****"
159
[ "$OS_RELEASE" = "4" ]  && echo "**** Build for SL4 ****"
163
[ "$OS_RELEASE" = "5" ]   && echo "**** Build for SL5 ****"
160
[ "$OS_RELEASE" = "5" ]  && echo "**** Build for SL5 ****"
164
[ $MINI ] && echo "**** Build for MINI-CD ****"
-
 
165
echo "--------------------------------------------"
161
echo "--------------------------------------------"
166
 
162
 
167
 
163
 
168
 
164
 
169
### download livecd web page (for documentation)
165
### download livecd web page (for documentation)
Line 172... Line 168...
172
 
168
 
173
rm -rf /tmp/doc
169
rm -rf /tmp/doc
174
mkdir -p /tmp/doc
170
mkdir -p /tmp/doc
175
wget --timeout=3 --quiet -nH --mirror -P /tmp/doc http://linux.web.psi.ch/livecd/
171
wget --timeout=3 --quiet -nH --mirror -P /tmp/doc http://linux.web.psi.ch/livecd/
176
wget --timeout=3 --quiet -nH --mirror -P /tmp/doc http://linux.web.psi.ch/livecd/layout.css
172
wget --timeout=3 --quiet -nH --mirror -P /tmp/doc http://linux.web.psi.ch/livecd/layout.css
177
if [ -d /tmp/doc/livecd ]; then
-
 
178
    echo "done."
-
 
179
else
-
 
180
    echo "download failed - not critical ;-)"
173
[ -d /tmp/doc/livecd ] && echo "done." || echo "download failed - not critical ;-)"
181
fi
-
 
182
 
-
 
183
 
-
 
184
 
-
 
185
### clean up build script directory
-
 
186
### -----------------------------------------------------------
-
 
187
echo "--------------------------------------------"
-
 
188
echo "Remove all *~ files in $( pwd )"
-
 
189
find . | grep "~$" | while read f; do rm -f "$f"; done
-
 
190
echo "done."
-
 
191
echo "--------------------------------------------"
-
 
192
 
174
 
193
 
175
 
194
 
176
 
195
### Run customize-livecd.sh
177
### Run customize-livecd.sh
196
### -----------------------------------------------------------
178
### -----------------------------------------------------------
Line 245... Line 227...
245
 
227
 
246
sed -i "s|append linux|append initrd=boot/initrd.gz init=linuxrc $BOOT_OPTIONS|" cd-root/isolinux.cfg
228
sed -i "s|append linux|append initrd=boot/initrd.gz init=linuxrc $BOOT_OPTIONS|" cd-root/isolinux.cfg
247
sed -i "s|append smp|append initrd=boot/initrd${SMP}.gz init=linuxrc $BOOT_OPTIONS|" cd-root/isolinux.cfg
229
sed -i "s|append smp|append initrd=boot/initrd${SMP}.gz init=linuxrc $BOOT_OPTIONS|" cd-root/isolinux.cfg
248
sed -i "s|append failsafe|append initrd=boot/initrd.gz init=linuxrc $BOOT_OPTIONS $FAILSAFE_BOOT_OPTIONS|" cd-root/isolinux.cfg
230
sed -i "s|append failsafe|append initrd=boot/initrd.gz init=linuxrc $BOOT_OPTIONS $FAILSAFE_BOOT_OPTIONS|" cd-root/isolinux.cfg
249
 
231
 
250
### create splash.cfg from plash.cfg.tpl
232
### create splash.cfg from splash.cfg.tpl
251
echo "Create in splash.cfg"
233
echo "Create in splash.cfg"
252
cp cd-root/boot/splash.cfg.tpl cd-root/boot/splash.cfg
234
cp cd-root/boot/splash.cfg.tpl cd-root/boot/splash.cfg
253
[ -e /etc/redhat-release ] && RELEASE=$( cat /etc/redhat-release )
235
[ -e /etc/redhat-release ] && RELEASE=$( cat /etc/redhat-release )
254
ARCH64=""
236
ARCH64=""
255
[ "$ARCH" = "x86_64" ] && ARCH64="64bit"
237
[ "$ARCH" = "x86_64" ] && ARCH64="64bit"
Line 272... Line 254...
272
echo "--------------------------------------------"
254
echo "--------------------------------------------"
273
./runme.sh
255
./runme.sh
274
rm -f cd-root/boot/splash.cfg
256
rm -f cd-root/boot/splash.cfg
275
rm -f cd-root/isolinux.cfg
257
rm -f cd-root/isolinux.cfg
276
 
258
 
-
 
259
 
-
 
260
 
277
### Run restore-system.sh
261
### Run restore-system.sh
278
### -----------------------------------------------------------
262
### -----------------------------------------------------------
279
echo
263
echo
280
echo "--------------------------------------------"
264
echo "--------------------------------------------"
281
echo "Now fix things to make this system bootable"
265
echo "Now fix things to make this system bootable"