Subversion Repositories livecd

Rev

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

Rev 125 Rev 128
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#
2
#
3
# Fix things during bootup - run last 
3
# Fix things during bootup - run last 
-
 
4
# called at the end of /etc/rc.d/rc.local
4
#
5
#
5
# Urs Beyerle, PSI
6
# Urs Beyerle, PSI
6
#
7
#
7
 
8
 
8
### -----------------------------------------------------------
9
### -----------------------------------------------------------
Line 48... Line 49...
48
 
49
 
49
# set password
50
# set password
50
PASSWD=$( cmdline_value passwd )
51
PASSWD=$( cmdline_value passwd )
51
[ ! $PASSWD ] && PASSWD=$( cmdline_value pw )
52
[ ! $PASSWD ] && PASSWD=$( cmdline_value pw )
52
 
53
 
53
# no password = empty password ?
54
# no password = empty password
54
NOPASSWD=$( cmdline_parameter nopasswd )
55
NOPASSWD=$( cmdline_parameter nopasswd )
55
 
56
 
56
# keyboard layout (kb= or keyboard=)
57
# keyboard layout (kb= or keyboard=)
57
KEYBOARD=$( cmdline_value keyboard )
58
KEYBOARD=$( cmdline_value keyboard )
58
KB=$( cmdline_value kb )
59
KB=$( cmdline_value kb )
Line 96... Line 97...
96
else
97
else
97
    MOUNTOPT="noauto,users,ro"
98
    MOUNTOPT="noauto,users,ro"
98
fi
99
fi
99
 
100
 
100
# folder where we find data which was previously stored
101
# folder where we find data which was previously stored
101
# (normally on a usbstick, but can be partition)
102
# (can be on an usbstick or harddisk partition)
102
if [ $PSI ]; then
103
if [ $PSI ]; then
103
    SAVEFOLDER=PSI_LIVECD
104
    SAVEFOLDER=PSI_LIVECD
104
else
105
else
105
    SAVEFOLDER=SL_LIVECD
106
    SAVEFOLDER=SL_LIVECD
106
fi
107
fi
107
 
108
 
108
# local home partition?
109
# local home partition?
109
# (e.g. /dev/hda1, /dev/hda1:/my_home)
110
# (e.g. /dev/hda1, /dev/hda1:/my_home)
110
HOMELOCAL=$( cmdline_value home )
111
HOMELOCAL=$( cmdline_value home )
111
 
112
 
112
# fast booting ?
113
# fast booting?
113
FASTBOOT=$( cmdline_parameter fastboot )
114
FASTBOOT=$( cmdline_parameter fastboot )
114
 
115
 
115
# start afs?
116
# start afs?
116
AFS=$( cmdline_parameter afs )
117
AFS=$( cmdline_parameter afs )
117
 
118
 
Line 183... Line 184...
183
    ### Intel Mobile 915GM
184
    ### Intel Mobile 915GM
184
    lspci | grep -q VGA.*Intel.*Mobile.*915GM
185
    lspci | grep -q VGA.*Intel.*Mobile.*915GM
185
    if [ "$?" = "0" ]; then
186
    if [ "$?" = "0" ]; then
186
	I915GM=i915gm
187
	I915GM=i915gm
187
	[ $XDRIVER ] || XDRIVER=i810
188
	[ $XDRIVER ] || XDRIVER=i810
188
	I855RESOLUTION=on
-
 
189
    fi
189
    fi
190
 
190
 
191
    ### Intel Mobile 855GM
191
    ### Intel Mobile 855GM
192
    lspci | grep -q VGA.*Intel.*855GM
192
    lspci | grep -q VGA.*Intel.*855GM
193
    if [ "$?" = "0" ]; then
193
    if [ "$?" = "0" ]; then
194
	I855GM=i855gm
194
	I855GM=i855gm
195
	I855RESOLUTION=on
-
 
196
    fi
195
    fi
197
fi
196
fi
198
 
197
 
199
 
198
 
200
### -----------------------------------------------------------
199
### -----------------------------------------------------------
Line 314... Line 313...
314
else
313
else
315
    [ $LOCALUSER ] || LOCALUSER=sluser
314
    [ $LOCALUSER ] || LOCALUSER=sluser
316
    DEFAULT_HOSTNAME=slinux
315
    DEFAULT_HOSTNAME=slinux
317
fi
316
fi
318
 
317
 
319
### start 855resolution?
-
 
320
[ $I855RESOLUTION ] && /etc/init.d/855resolution start 2>/dev/null
-
 
321
 
-
 
322
 
-
 
323
### configure Xserver
-
 
324
 
-
 
325
### check for xorg.conf in CONFIG_FOLDER
318
### check for xorg.conf in CONFIG_FOLDER
326
if [ -r $CONFIG_FOLDER/xorg.conf ]; then
319
if [ -r $CONFIG_FOLDER/xorg.conf ]; then
327
    cp -af $CONFIG_FOLDER/xorg.conf $XORG_CONF
320
    cp -af $CONFIG_FOLDER/xorg.conf $XORG_CONF
328
    if [ "$?" = "0" ]; then
321
    if [ "$?" = "0" ]; then
329
	echo "Saved xorg.conf file found."
322
	echo "Saved xorg.conf file found."
Line 619... Line 612...
619
	    fi	
612
	    fi	
620
	fi
613
	fi
621
    fi
614
    fi
622
fi
615
fi
623
 
616
 
624
### define default hostname, if $HOSTNAME still not yet set
617
### define default hostname, if $HOSTNAME is still not yet set
625
if [ ! $HOSTNAME ]; then
618
if [ ! $HOSTNAME ]; then
626
    HOSTNAME=$DEFAULT_HOSTNAME
619
    HOSTNAME=$DEFAULT_HOSTNAME
627
fi
620
fi
628
 
621
 
629
### set hostname
622
### set hostname