Subversion Repositories livecd

Rev

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

Rev 169 Rev 170
Line 84... Line 84...
84
# $UNION will be used as a root directory, livecd modules will be added soon.
84
# $UNION will be used as a root directory, livecd modules will be added soon.
85
echolog "setup union on $UNION"
85
echolog "setup union on $UNION"
86
mkdir -p $UNION
86
mkdir -p $UNION
87
mkdir -p $MEMORY
87
mkdir -p $MEMORY
88
 
88
 
-
 
89
# looking for changes= parameter
89
CHANGESDEV="`cmdline_value changes`"
90
CHANGESVAL="`cmdline_value changes`"
90
if [ "$CHANGESDEV" != "" ]; then
91
if [ "$CHANGESVAL" != "" ]; then 
-
 
92
    # disable kernel warnings
91
   echo "mounting $CHANGESDEV to $MEMORY"
93
    PRINTK=`cat /proc/sys/kernel/printk`
92
   # we may need usb and sata support
94
    echo "0" >/proc/sys/kernel/printk
-
 
95
    find_changes
93
   modprobe_usb_sata_modules
96
    # enable kernel warnings
94
   mount_device $CHANGESDEV $MEMORY
97
    echo "$PRINTK" >/proc/sys/kernel/printk
-
 
98
fi
-
 
99
 
95
else false; fi
100
$DEBUGCMD
96
 
101
 
97
# mount tmpfs only in the case when changes= boot parameter was empty
102
# mount tmpfs only in the case when changes= boot parameter was empty
-
 
103
if [ "$CHANGESVAL" = "" ]; then 
98
# or we were not able to mount the storage device
104
    echolog "mount tmpfs"
99
if [ $? -ne 0 ]; then mount -t tmpfs -o "size=$RAMSIZE" tmpfs $MEMORY; fi
105
    mount -t tmpfs -o "size=$RAMSIZE" tmpfs $MEMORY
-
 
106
    $DEBUGCMD
-
 
107
fi
100
 
108
 
101
mkdir -p $CHANGES
109
mkdir -p $CHANGES
102
mkdir -p $COPY2RAM
110
mkdir -p $COPY2RAM
103
mkdir -p $IMAGES
111
mkdir -p $IMAGES
104
 
112
 
Line 117... Line 125...
117
$DEBUGCMD
125
$DEBUGCMD
118
 
126
 
119
# try to find livecd data directory. If not found, try modprobing
127
# try to find livecd data directory. If not found, try modprobing
120
# USB and SATA kernel modules and repeat the find procedure again
128
# USB and SATA kernel modules and repeat the find procedure again
121
echolog "looking for data modules"
129
echolog "looking for data modules"
-
 
130
 
-
 
131
# disable kernel warnings
-
 
132
PRINTK=`cat /proc/sys/kernel/printk`
-
 
133
echo "0" >/proc/sys/kernel/printk
122
DATA="`find_live_data_dir $MOUNTDIR`";
134
DATA="`find_live_data_dir $MOUNTDIR`"
-
 
135
# enable kernel warnings
-
 
136
echo "$PRINTK" >/proc/sys/kernel/printk
-
 
137
 
123
if [ "$DATA" = "" ]; then modprobe_usb_sata_modules; DATA="`find_live_data_dir $MOUNTDIR`"; fi
138
if [ "$DATA" = "" ]; then modprobe_usb_sata_modules; DATA="`find_live_data_dir $MOUNTDIR`"; fi
124
if [ "$DATA" = "" ]; then fatal "Data for LiveCD not found."; fi
139
if [ "$DATA" = "" ]; then fatal "Data for LiveCD not found."; fi
125
echolog "LiveCD found in: $DATA"
140
echolog "LiveCD found in: $DATA"
126
 
141
 
127
$DEBUGCMD
142
$DEBUGCMD