Lines 7-13
source /tmp/chroot-functions.sh
Link Here
|
7 |
# Allow root logins to our CD by default |
7 |
# Allow root logins to our CD by default |
8 |
if [ -e /etc/ssh/sshd_config ] |
8 |
if [ -e /etc/ssh/sshd_config ] |
9 |
then |
9 |
then |
10 |
sed -i 's:^#PermitRootLogin\ yes:PermitRootLogin\ yes:' \ |
10 |
${clst_sed} -i 's:^#PermitRootLogin\ yes:PermitRootLogin\ yes:' \ |
11 |
/etc/ssh/sshd_config |
11 |
/etc/ssh/sshd_config |
12 |
fi |
12 |
fi |
13 |
|
13 |
|
Lines 73-79
fi
Link Here
|
73 |
# Setup sudoers |
73 |
# Setup sudoers |
74 |
if [ -f /etc/sudoers ] |
74 |
if [ -f /etc/sudoers ] |
75 |
then |
75 |
then |
76 |
sed -i '/NOPASSWD: ALL/ s/^# //' /etc/sudoers |
76 |
${clst_sed} -i '/NOPASSWD: ALL/ s/^# //' /etc/sudoers |
77 |
fi |
77 |
fi |
78 |
|
78 |
|
79 |
# Setup links for ethernet devices |
79 |
# Setup links for ethernet devices |
Lines 113-119
echo "####################################################" >> ${clst_make_conf}
Link Here
|
113 |
cat ${clst_make_conf}.old >> ${clst_make_conf} |
113 |
cat ${clst_make_conf}.old >> ${clst_make_conf} |
114 |
|
114 |
|
115 |
# devfs tweaks |
115 |
# devfs tweaks |
116 |
[ -e /etc/devfsd.conf ] && sed -i '/dev-state/ s:^:#:' /etc/devfsd.conf |
116 |
[ -e /etc/devfsd.conf ] && ${clst_sed} -i '/dev-state/ s:^:#:' /etc/devfsd.conf |
117 |
|
117 |
|
118 |
# Add some helpful aliases |
118 |
# Add some helpful aliases |
119 |
echo "alias cp='cp -i'" >> /etc/profile |
119 |
echo "alias cp='cp -i'" >> /etc/profile |
Lines 153-162
fi
Link Here
|
153 |
# Setup configured display manager |
153 |
# Setup configured display manager |
154 |
if [ -n "${clst_livecd_xdm}" ] |
154 |
if [ -n "${clst_livecd_xdm}" ] |
155 |
then |
155 |
then |
156 |
sed -i \ |
156 |
${clst_sed} -i \ |
157 |
-e "s:^#\\?DISPLAYMANAGER=.\+$:DISPLAYMANAGER=\"${clst_livecd_xdm}\":" \ |
157 |
-e "s:^#\\?DISPLAYMANAGER=.\+$:DISPLAYMANAGER=\"${clst_livecd_xdm}\":" \ |
158 |
/etc/rc.conf |
158 |
/etc/rc.conf |
159 |
sed -i \ |
159 |
${clst_sed} -i \ |
160 |
-e "s:^#\\?DISPLAYMANAGER=.\+$:DISPLAYMANAGER=\"${clst_livecd_xdm}\":" \ |
160 |
-e "s:^#\\?DISPLAYMANAGER=.\+$:DISPLAYMANAGER=\"${clst_livecd_xdm}\":" \ |
161 |
/etc/conf.d/xdm |
161 |
/etc/conf.d/xdm |
162 |
fi |
162 |
fi |
Lines 175-195
case ${clst_livecd_type} in
Link Here
|
175 |
gentoo-release-universal) |
175 |
gentoo-release-universal) |
176 |
cat /etc/generic.motd.txt /etc/universal.motd.txt \ |
176 |
cat /etc/generic.motd.txt /etc/universal.motd.txt \ |
177 |
/etc/minimal.motd.txt > /etc/motd |
177 |
/etc/minimal.motd.txt > /etc/motd |
178 |
sed -i 's:^##GREETING:Welcome to the Gentoo Linux Universal Installation CD!:' /etc/motd |
178 |
${clst_sed} -i 's:^##GREETING:Welcome to the Gentoo Linux Universal Installation CD!:' /etc/motd |
179 |
;; |
179 |
;; |
180 |
gentoo-release-minimal) |
180 |
gentoo-release-minimal) |
181 |
cat /etc/generic.motd.txt /etc/minimal.motd.txt > /etc/motd |
181 |
cat /etc/generic.motd.txt /etc/minimal.motd.txt > /etc/motd |
182 |
sed -i 's:^##GREETING:Welcome to the Gentoo Linux Minimal Installation CD!:' /etc/motd |
182 |
${clst_sed} -i 's:^##GREETING:Welcome to the Gentoo Linux Minimal Installation CD!:' /etc/motd |
183 |
;; |
183 |
;; |
184 |
gentoo-release-live*) |
184 |
gentoo-release-live*) |
185 |
cat /etc/generic.motd.txt \ |
185 |
cat /etc/generic.motd.txt \ |
186 |
/etc/minimal.motd.txt /etc/livecd.motd.txt > /etc/motd |
186 |
/etc/minimal.motd.txt /etc/livecd.motd.txt > /etc/motd |
187 |
sed -i -e 's:^##GREETING:Welcome to the Gentoo Linux LiveCD!:' \ |
187 |
${clst_sed} -i -e 's:^##GREETING:Welcome to the Gentoo Linux LiveCD!:' \ |
188 |
-e "s:##DISPLAY_MANAGER:${clst_livecd_xdm}:" /etc/motd |
188 |
-e "s:##DISPLAY_MANAGER:${clst_livecd_xdm}:" /etc/motd |
189 |
;; |
189 |
;; |
190 |
gentoo-gamecd) |
190 |
gentoo-gamecd) |
191 |
cat /etc/generic.motd.txt /etc/gamecd.motd.txt > /etc/motd |
191 |
cat /etc/generic.motd.txt /etc/gamecd.motd.txt > /etc/motd |
192 |
sed -i 's:^##GREETING:Welcome to the Gentoo Linux ##GAME_NAME GameCD!:' /etc/motd |
192 |
${clst_sed} -i 's:^##GREETING:Welcome to the Gentoo Linux ##GAME_NAME GameCD!:' /etc/motd |
193 |
;; |
193 |
;; |
194 |
esac |
194 |
esac |
195 |
|
195 |
|
Lines 200-206
if [ -n "${clst_livecd_splash_theme}" ]
Link Here
|
200 |
then |
200 |
then |
201 |
if [ -d /etc/splash/${clst_livecd_splash_theme} ] |
201 |
if [ -d /etc/splash/${clst_livecd_splash_theme} ] |
202 |
then |
202 |
then |
203 |
sed -i \ |
203 |
${clst_sed} -i \ |
204 |
-e "s:# SPLASH_THEME=\"gentoo\":SPLASH_THEME=\"${clst_livecd_splash_theme}\":" \ |
204 |
-e "s:# SPLASH_THEME=\"gentoo\":SPLASH_THEME=\"${clst_livecd_splash_theme}\":" \ |
205 |
-e "/^# SPLASH_TTYS=/ s/^#//" \ |
205 |
-e "/^# SPLASH_TTYS=/ s/^#//" \ |
206 |
/etc/conf.d/splash |
206 |
/etc/conf.d/splash |
Lines 229-235
case ${clst_livecd_type} in
Link Here
|
229 |
rm /tmp/gamecd.conf |
229 |
rm /tmp/gamecd.conf |
230 |
|
230 |
|
231 |
# Here we replace out game information into several files |
231 |
# Here we replace out game information into several files |
232 |
sed -i -e "s:##GAME_NAME:${GAME_NAME}:" /etc/motd |
232 |
${clst_sed} -i -e "s:##GAME_NAME:${GAME_NAME}:" /etc/motd |
233 |
|
233 |
|
234 |
# Here we setup our xinitrc |
234 |
# Here we setup our xinitrc |
235 |
echo "exec ${GAME_EXECUTABLE}" > /etc/X11/xinit/xinitrc |
235 |
echo "exec ${GAME_EXECUTABLE}" > /etc/X11/xinit/xinitrc |
Lines 276-282
case ${clst_livecd_type} in
Link Here
|
276 |
/etc/X11/gdm/custom.conf |
276 |
/etc/X11/gdm/custom.conf |
277 |
else |
277 |
else |
278 |
cp -f /etc/X11/gdm/gdm.conf /etc/X11/gdm/gdm.conf.old |
278 |
cp -f /etc/X11/gdm/gdm.conf /etc/X11/gdm/gdm.conf.old |
279 |
sed -i \ |
279 |
${clst_sed} -i \ |
280 |
-e 's:TimedLoginEnable=false:TimedLoginEnable=true:' \ |
280 |
-e 's:TimedLoginEnable=false:TimedLoginEnable=true:' \ |
281 |
-e 's:TimedLoginDelay=30:TimedLoginDelay=10:' \ |
281 |
-e 's:TimedLoginDelay=30:TimedLoginDelay=10:' \ |
282 |
-e 's:AllowRemoteRoot=true:AllowRemoteRoot=false:' \ |
282 |
-e 's:AllowRemoteRoot=true:AllowRemoteRoot=false:' \ |
Lines 286-292
case ${clst_livecd_type} in
Link Here
|
286 |
|
286 |
|
287 |
if [ -n "${clst_livecd_users}" ] && [ -n "${first_user}" ] |
287 |
if [ -n "${clst_livecd_users}" ] && [ -n "${first_user}" ] |
288 |
then |
288 |
then |
289 |
sed -i \ |
289 |
${clst_sed} -i \ |
290 |
-e "s:TimedLogin=:TimedLogin=${first_user}:" \ |
290 |
-e "s:TimedLogin=:TimedLogin=${first_user}:" \ |
291 |
/etc/X11/gdm/gdm.conf |
291 |
/etc/X11/gdm/gdm.conf |
292 |
fi |
292 |
fi |
Lines 296-302
case ${clst_livecd_type} in
Link Here
|
296 |
# This gives us our list of system packages for the installer |
296 |
# This gives us our list of system packages for the installer |
297 |
mkdir -p /usr/livecd |
297 |
mkdir -p /usr/livecd |
298 |
### XXX: Andrew says we don't need this anymore |
298 |
### XXX: Andrew says we don't need this anymore |
299 |
USE="-* $(cat /var/db/pkg/sys-libs/glibc*/USE)" emerge -eqp @system | grep -e '^\[ebuild' | sed -e 's:^\[ebuild .\+\] ::' -e 's: .\+$::' > /usr/livecd/systempkgs.txt |
299 |
USE="-* $(cat /var/db/pkg/sys-libs/glibc*/USE)" emerge -eqp @system | grep -e '^\[ebuild' | ${clst_sed} -e 's:^\[ebuild .\+\] ::' -e 's: .\+$::' > /usr/livecd/systempkgs.txt |
300 |
|
300 |
|
301 |
# This is my hack to reduce tmpfs usage |
301 |
# This is my hack to reduce tmpfs usage |
302 |
cp -r ${clst_repo_basedir}/${clst_repo_name}/profiles /usr/livecd |
302 |
cp -r ${clst_repo_basedir}/${clst_repo_name}/profiles /usr/livecd |
Lines 331-340
case ${clst_livecd_type} in
Link Here
|
331 |
/home/${username}/Desktop |
331 |
/home/${username}/Desktop |
332 |
cp -f /usr/share/applications/installer-dialog.desktop \ |
332 |
cp -f /usr/share/applications/installer-dialog.desktop \ |
333 |
/home/${username}/Desktop |
333 |
/home/${username}/Desktop |
334 |
sed -i -e \ |
334 |
${clst_sed} -i -e \ |
335 |
's:Exec=installer-dialog:Exec=sudo installer-dialog:' \ |
335 |
's:Exec=installer-dialog:Exec=sudo installer-dialog:' \ |
336 |
/home/${username}/Desktop/installer-dialog.desktop |
336 |
/home/${username}/Desktop/installer-dialog.desktop |
337 |
sed -i -e 's:Exec=installer-gtk:Exec=installer:' \ |
337 |
${clst_sed} -i -e 's:Exec=installer-gtk:Exec=installer:' \ |
338 |
/home/${username}/Desktop/installer-gtk.desktop |
338 |
/home/${username}/Desktop/installer-gtk.desktop |
339 |
fi |
339 |
fi |
340 |
chown -R ${username}:100 /home/${username} |
340 |
chown -R ${username}:100 /home/${username} |
Lines 369-380
esac
Link Here
|
369 |
# We want the first user to be used when auto-starting X |
369 |
# We want the first user to be used when auto-starting X |
370 |
if [ -e /etc/startx ] |
370 |
if [ -e /etc/startx ] |
371 |
then |
371 |
then |
372 |
sed -i "s:##STARTX:echo startx | su - '${first_user}':" /root/.bashrc |
372 |
${clst_sed} -i "s:##STARTX:echo startx | su - '${first_user}':" /root/.bashrc |
373 |
fi |
373 |
fi |
374 |
|
374 |
|
375 |
if [ -e /lib/rcscripts/addons/udev-start.sh ] |
375 |
if [ -e /lib/rcscripts/addons/udev-start.sh ] |
376 |
then |
376 |
then |
377 |
sed -i "s:\t\[\[ -x /sbin/evms_activate:\t\[\[ -x \${CDBOOT} \]\] \&\& \[\[ -x /sbin/evms_activate:" /lib/rcscripts/addons/udev-start.sh |
377 |
${clst_sed} -i "s:\t\[\[ -x /sbin/evms_activate:\t\[\[ -x \${CDBOOT} \]\] \&\& \[\[ -x /sbin/evms_activate:" /lib/rcscripts/addons/udev-start.sh |
378 |
fi |
378 |
fi |
379 |
|
379 |
|
380 |
env-update |
380 |
env-update |