Subversion Repositories livecd

Rev

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

Rev 230 Rev 231
Line 164... Line 164...
164
	    mkdir -p /mini/${base}
164
	    mkdir -p /mini/${base}
165
	    mv ${folder} /mini${base}
165
	    mv ${folder} /mini${base}
166
	done
166
	done
167
    fi
167
    fi
168
 
168
 
-
 
169
    ### enable auto login
-
 
170
    customize/livecd-autologin -u $LOCALUSER on >/dev/null 2>&1
-
 
171
    echo "livecd-autologin -u $LOCALUSER on >/dev/null 2>&1" >> /etc/rc.d/init.d/runlast
-
 
172
 
169
    ### run updatedb
173
    ### run updatedb
170
    echo "Run updatedb..."
174
    echo "Run updatedb..."
171
    . /etc/updatedb.conf 2>/dev/null
175
    . /etc/updatedb.conf 2>/dev/null
172
    rpm -q mlocate >/dev/null
176
    rpm -q mlocate >/dev/null
173
    if [ "$?" = "0" ]; then
177
    if [ "$?" = "0" ]; then
Line 175... Line 179...
175
    else
179
    else
176
	/usr/bin/updatedb -e /media,/tmp,/boot,/livecd,/home,/net,/trunk
180
	/usr/bin/updatedb -e /media,/tmp,/boot,/livecd,/home,/net,/trunk
177
    fi
181
    fi
178
    echo "done."
182
    echo "done."
179
 
183
 
180
    ### change init runlevel to 3
-
 
181
    sed -i "s/id\:.\:initdefault/id\:3\:initdefault/" /etc/inittab
-
 
182
 
-
 
183
    ### autologin at tty6
-
 
184
    if [ $ROOTLOGIN ]; then
-
 
185
	line="6:2345:respawn:\/sbin\/mingetty --autologin root tty6"
-
 
186
	# modify .bashrc for root
-
 
187
	grep -q "/dev/tty6" /root/.bashrc
-
 
188
	if [ "$?" = "1" ]; then
-
 
189
	    echo 'if [ "$( tty )" = "/dev/tty6" ]; then startx; fi' >> /root/.bashrc
-
 
190
	fi
-
 
191
    else
-
 
192
	line="6:2345:respawn:\/sbin\/mingetty --autologin $LOCALUSER tty6"
-
 
193
    fi
-
 
194
    sed -i "s/.*respawn.*tty6.*/$line/" /etc/inittab
-
 
195
 
-
 
196
    ### /etc/rc.d/init.d/login
-
 
197
    ### Provides directly login over xinit
-
 
198
    cp -a customize/login /etc/rc.d/init.d/login
-
 
199
    chmod +x /etc/rc.d/init.d/login
-
 
200
    
-
 
201
    ### modify /etc/rc.d/init.d/runlast: add /etc/init.d/login at the end
-
 
202
    RUNLAST=/etc/rc.d/init.d/runlast
-
 
203
    echo >> $RUNLAST
-
 
204
    echo "### execute /etc/init.d/login for direct login" >> $RUNLAST
-
 
205
    echo "/etc/init.d/login" >> $RUNLAST
-
 
206
    echo >> $RUNLAST
-
 
207
 
184
 
208
 
185
 
209
### -----------------------------------------------------------
186
### -----------------------------------------------------------
210
### Restores some modifications
187
### Restores some modifications
211
else
188
else
Line 228... Line 205...
228
	    mv /mini${folder} ${base}
205
	    mv /mini${folder} ${base}
229
	done
206
	done
230
	mv /mini/usr/share/i18n/locales/* /usr/share/i18n/locales/
207
	mv /mini/usr/share/i18n/locales/* /usr/share/i18n/locales/
231
	echo "done."
208
	echo "done."
232
    fi
209
    fi
-
 
210
 
-
 
211
    ### disable auto login
-
 
212
    customize/livecd-autologin -u $LOCALUSER off >/dev/null 2>&1
-
 
213
    sed -i "s|^livecd-autologin.*|d" /etc/rc.d/init.d/runlast
-
 
214
 
233
fi
215
fi
234
 
216
 
235
 
217
 
236
echo "--------------------------------------------"
218
echo "--------------------------------------------"
237
echo "End of mini-livecd.sh" 
219
echo "End of mini-livecd.sh"