Subversion Repositories livecd

Rev

Rev 179 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 179 Rev 181
Line 30... Line 30...
30
   cat <<EOF
30
   cat <<EOF
31
 
31
 
32
  Options:
32
  Options:
33
 
33
 
34
    -h          print this screen
34
    -h          print this screen
35
    -sl4        build SL4 LiveCD/DVD
-
 
36
    -sl5        build SL5 LiveCD/DVD
-
 
37
 
35
 
38
  Optional Options:
36
  Optional Options:
39
 
37
 
40
    -psi        customize for PSI LiveCD
38
    -psi        customize for PSI LiveCD
41
    -mini       build a MINI-CD (not well tested)
39
    -mini       build a MINI-CD (not well tested)
Line 70... Line 68...
70
    case "$1" in
68
    case "$1" in
71
       -h)
69
       -h)
72
            usage; exit;;
70
            usage; exit;;
73
       -psi)
71
       -psi)
74
            PSI="-psi"; shift; continue;;
72
            PSI="-psi"; shift; continue;;
75
       -sl4)
-
 
76
            SL="-sl"; export OS_RELEASE=4; shift; continue;;
-
 
77
       -sl5)
-
 
78
            SL="-sl"; export OS_RELEASE=5; shift; continue;;
-
 
79
       -mini)
73
       -mini)
80
            MINI="-mini"; shift; continue;;
74
            MINI="-mini"; shift; continue;;
81
       -nomove)
75
       -nomove)
82
            NOMOVE="-nomove"; shift; continue;;
76
            NOMOVE="-nomove"; shift; continue;;
83
       -rootlogin)
77
       -rootlogin)
Line 90... Line 84...
90
 
84
 
91
done
85
done
92
 
86
 
93
### check if I run inside my directory
87
### check if I run inside my directory
94
if [ ! -x $( basename $0 ) ]; then
88
if [ ! -x $( basename $0 ) ]; then
95
    echo "Please run $( basename $0 ) within its directory"
89
    echo "ERROR: Please run $( basename $0 ) within its directory"
96
    exit 1
90
    exit 1
97
fi
91
fi
98
 
92
 
99
### source livecd.conf
93
### source livecd.conf
100
. livecd.conf
94
. livecd.conf
101
 
95
 
102
### test input
96
### test input
103
[ ! $SL ] && usage 
97
if [ ! $OS_RELEASE ]; then
-
 
98
    echo "ERROR: Please define OS_RELEASE in livecd.conf"
-
 
99
    exit 1
-
 
100
fi
104
 
101
 
105
### show warning, if not in chroot
102
### show warning, if not in chroot
106
mounts=$( mount 2>/dev/null | grep -v proc )
103
mounts=$( mount 2>/dev/null | grep -v proc )
107
if [ "$mounts" != "" ]; then
104
if [ "$mounts" != "" ]; then
108
    echo; echo "It seems that you do not build in chroot."
105
    echo; echo "It seems that you do not build in chroot."
Line 129... Line 126...
129
 
126
 
130
### write script version to /etc/livecd-release
127
### write script version to /etc/livecd-release
131
SCRIPT_VERSION=$( cat version 2>/dev/null )
128
SCRIPT_VERSION=$( cat version 2>/dev/null )
132
echo $SCRIPT_VERSION > /etc/livecd-release
129
echo $SCRIPT_VERSION > /etc/livecd-release
133
 
130
 
-
 
131
### Check if we have the kernel, which is defined in livecd.conf
-
 
132
rpm -q kernel | grep -q $KERNEL
-
 
133
if [ "$?" != "0" ]; then
-
 
134
    echo "ERROR: You don't have kernel $KERNEL installed."
-
 
135
    echo "       Please check your settings in livecd.conf"
-
 
136
    exit 1
-
 
137
fi
-
 
138
 
134
### Check for SMP kernel and set SMP variable
139
### Check for SMP kernel and set SMP variable
135
#   if you change SMP="s", you have also to change isolinux.cfg!
140
#   if you change SMP="s", you have also to change isolinux.cfg!
136
#   SMP can only be one character in lenght!
141
#   SMP can only be one character in lenght!
137
SMP=""
142
SMP=""
138
[ -e /boot/vmlinuz-${KERNEL}smp ] && export SMP="s"
143
[ -e /boot/vmlinuz-${KERNEL}smp ] && export SMP="s"