Subversion Repositories livecd

Rev

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

Rev 101 Rev 110
Line 127... Line 127...
127
userdel -r $LOCALUSER 2>/dev/null
127
userdel -r $LOCALUSER 2>/dev/null
128
userdel -r l_psi 2>/dev/null
128
userdel -r l_psi 2>/dev/null
129
userdel -r sluser 2>/dev/null
129
userdel -r sluser 2>/dev/null
130
userdel -r user 2>/dev/null
130
userdel -r user 2>/dev/null
131
 
131
 
132
# move /opt to /usr/opt and link /opt -> /usr/opt
-
 
133
# (if not already yet done before)
-
 
134
# if [ ! -L /opt ]; then
-
 
135
#    echo "Move /opt to /usr/opt"
-
 
136
#    mv /opt /usr/
-
 
137
#    ln -s /usr/opt /opt
-
 
138
# fi
-
 
139
# 
-
 
140
# fix /opt link (can be removed later)
-
 
141
if [ -L /opt ]; then
-
 
142
    echo "Move /usr/opt back to /opt"
-
 
143
    rm -f /opt
-
 
144
    mv /usr/opt /opt
-
 
145
fi
-
 
146
 
-
 
147
# umount PSI master
132
# umount PSI master
148
[ $PSI ] && umount /mnt/master 2>/dev/null
133
[ $PSI ] && umount /mnt/master 2>/dev/null
149
    
134
    
150
# copy back /etc/yum.repos.d
135
# copy back /etc/yum.repos.d
151
if [ ! $PSI ]; then
136
if [ ! $PSI ]; then
Line 154... Line 139...
154
    fi
139
    fi
155
fi
140
fi
156
 
141
 
157
# run cfagent
142
# run cfagent
158
if [ $PSI ]; then
143
if [ $PSI ]; then
-
 
144
    if [ -e /usr/bin/cfagent ]; then
159
    # cfagent needs running afs
145
        # cfagent needs running afs
160
    /etc/init.d/afs start
146
	/etc/init.d/afs start
161
    echo "Run cfagent ..."
147
	echo "Run cfagent ..."
162
    cfagent
148
	cfagent 
-
 
149
	/etc/init.d/afs stop    
-
 
150
    fi
163
fi
151
fi
164
 
152
 
165
echo "done."
153
echo "done."
166
echo "--------------------------------------------"
154
echo "--------------------------------------------"
167
 
155
 
Line 245... Line 233...
245
 
233
 
246
### create in /boot link to LiveCD kernel(s)
234
### create in /boot link to LiveCD kernel(s)
247
ln -fs /boot/vmlinuz-$KERNEL /boot/vmlinuz
235
ln -fs /boot/vmlinuz-$KERNEL /boot/vmlinuz
248
[ $SMP ] && ln -fs /boot/vmlinuz-${KERNEL}smp /boot/vmlinuz${SMP}
236
[ $SMP ] && ln -fs /boot/vmlinuz-${KERNEL}smp /boot/vmlinuz${SMP}
249
 
237
 
250
### Files to remove
238
### remove ssh keys
251
FILES_REMOVE="/etc/ssh/ssh_host_key \
239
FILES_REMOVE="/etc/ssh/ssh_host_key \
252
              /etc/ssh/ssh_host_key.pub \
240
              /etc/ssh/ssh_host_key.pub \
253
              /etc/ssh/ssh_host_rsa_key.pub \
241
              /etc/ssh/ssh_host_rsa_key.pub \
254
              /etc/ssh/ssh_host_dsa_key \
242
              /etc/ssh/ssh_host_dsa_key \
255
              /etc/ssh/ssh_host_dsa_key.pub"
243
              /etc/ssh/ssh_host_dsa_key.pub"
Line 288... Line 276...
288
        fi
276
        fi
289
    fi
277
    fi
290
done
278
done
291
 
279
 
292
### move some unneeded files to /mini (not for LiveDVD and miniCD)
280
### move some unneeded files to /mini (not for LiveDVD and miniCD)
-
 
281
#   to save disk space
-
 
282
 
293
if [ ! $DVD ] && [ ! $MINI ]; then
283
if [ ! $DVD ] && [ ! $MINI ]; then
294
    # to save disk space
-
 
295
 
284
 
296
    mkdir -p /mini
285
    mkdir -p /mini
297
 
286
 
298
    echo "Move some folders to /mini, to save disk space:"
287
    echo "Move some folders to /mini, to save disk space:"
299
 
288
 
Line 522... Line 511...
522
ln -fs consolehelper /usr/bin/livecd-install-gui
511
ln -fs consolehelper /usr/bin/livecd-install-gui
523
cp -a customize/livecd-install-gui/livecd-install-gui.desktop /usr/share/applications/
512
cp -a customize/livecd-install-gui/livecd-install-gui.desktop /usr/share/applications/
524
cp -a customize/livecd-install-gui/livecd-install-gui.console.apps /etc/security/console.apps/livecd-install-gui
513
cp -a customize/livecd-install-gui/livecd-install-gui.console.apps /etc/security/console.apps/livecd-install-gui
525
cp -a customize/livecd-install-gui/livecd-install-gui.pam.d /etc/pam.d/livecd-install-gui
514
cp -a customize/livecd-install-gui/livecd-install-gui.pam.d /etc/pam.d/livecd-install-gui
526
 
515
 
527
 
-
 
528
### livecd-mkinitrd (used by livecd-install)
516
### livecd-mkinitrd (used by livecd-install)
529
if [ -e customize/sl${OS_RELEASE}/livecd-mkinitrd ]; then
517
if [ -e customize/sl${OS_RELEASE}/livecd-mkinitrd ]; then
530
    cp -a customize/sl${OS_RELEASE}/livecd-mkinitrd /usr/sbin/
518
    cp -a customize/sl${OS_RELEASE}/livecd-mkinitrd /usr/sbin/
531
else
519
else
532
    cp -a /sbin/mkinitrd /usr/sbin/livecd-mkinitrd
520
    cp -a /sbin/mkinitrd /usr/sbin/livecd-mkinitrd
Line 535... Line 523...
535
 
523
 
536
echo "done."
524
echo "done."
537
echo "--------------------------------------------"
525
echo "--------------------------------------------"
538
 
526
 
539
 
527
 
-
 
528
###############################################################
-
 
529
# Create missing files
-
 
530
###############################################################
-
 
531
 
-
 
532
echo "Create missing files ..."
-
 
533
 
-
 
534
###############################################################
-
 
535
# /etc/hosts
-
 
536
### copy host file, if not existing
-
 
537
[ -e /etc/hosts ] || cp -a customize/hosts /etc/hosts
-
 
538
[ -e /etc/sysconfig/networking/profiles/default/hosts ] || cp -a customize/hosts /etc/sysconfig/networking/profiles/default/hosts
-
 
539
 
-
 
540
 
-
 
541
###############################################################
-
 
542
# /etc/shadow
-
 
543
[ -e /etc/shadow ] ||
-
 
544
 
-
 
545
# /etc/gshadow
-
 
546
if [ ! -e /etc/gshadow ]; then
-
 
547
    cp -a /etc/group /etc/gshadow
-
 
548
    sed -i "s|:x:|::|"       /etc/gshadow
-
 
549
    sed -i "s|:[0-9]\+:|::|" /etc/gshadow
-
 
550
fi
-
 
551
 
-
 
552
echo "done."
-
 
553
echo "--------------------------------------------"
-
 
554
 
-
 
555
 
540
 
556
 
541
###############################################################
557
###############################################################
542
# Create special files
558
# Create special files
543
###############################################################
559
###############################################################
544
 
560
 
Line 755... Line 771...
755
 
771
 
756
echo "done."
772
echo "done."
757
echo "--------------------------------------------"
773
echo "--------------------------------------------"
758
 
774
 
759
 
775
 
-
 
776
 
760
###############################################################
777
###############################################################
761
# Update locate db, prelink, makewhatis
778
# Update locate db, prelink, makewhatis
762
###############################################################
779
###############################################################
763
 
780
 
764
### run updatedb
781
### run updatedb