Lines 139-144
Link Here
|
139 |
MODULES_DIR= |
139 |
MODULES_DIR= |
140 |
MODULES_CONF= |
140 |
MODULES_CONF= |
141 |
HAVE_RAID= |
141 |
HAVE_RAID= |
|
|
142 |
HAVE_EVMS= |
142 |
FOUND_NON_PCI_IDE= |
143 |
FOUND_NON_PCI_IDE= |
143 |
|
144 |
|
144 |
LSPCI=/usr/bin/lspci |
145 |
LSPCI=/usr/bin/lspci |
Lines 154-159
Link Here
|
154 |
IGNORE_MODNAMES=" $IGNORE_MODNAMES ppa imm ide_scsi usb_storage" |
155 |
IGNORE_MODNAMES=" $IGNORE_MODNAMES ppa imm ide_scsi usb_storage" |
155 |
LOADED_MODNAMES= |
156 |
LOADED_MODNAMES= |
156 |
|
157 |
|
|
|
158 |
PRE_EVMS_MODNAMES="dm_mod" |
159 |
EVMS_ACTIVATE="/sbin/evms_activate" |
160 |
EVMS_CONFIG="/etc/evms.conf" |
161 |
EVMS_PLUGINS_REG="/(aix)|(bbr)|(bsd)|(disk)|(dos)|(drivelink)|(gpt)|(lvm)|(md)|(os2)|(s390)|(snapshot)[^[:space:]]*\.so" |
162 |
|
157 |
loopDev= |
163 |
loopDev= |
158 |
loopFs= |
164 |
loopFs= |
159 |
loopFile= |
165 |
loopFile= |
Lines 183-188
Link Here
|
183 |
fi |
189 |
fi |
184 |
} |
190 |
} |
185 |
|
191 |
|
|
|
192 |
LIBS_REG="/lib\(\|64\)/[^[:space:]]*\.so\(\.[^[:space:]]*\|\)" |
193 |
AddLibs() |
194 |
{ |
195 |
local list="$@" i |
196 |
( |
197 |
ldd $list | \ |
198 |
grep -s "${LIBS_REG}[[:space:]]" | \ |
199 |
sed -e "s@^.*[[:space:]]\(${LIBS_REG}\)[[:space:]].*@\1@" |
200 |
for i in $list; do |
201 |
echo "$i" |
202 |
done |
203 |
) | sort | uniq |
204 |
} |
205 |
|
206 |
AddLibsAll() |
207 |
{ |
208 |
local list="$@" newlist |
209 |
newlist=`AddLibs "$list"` |
210 |
while [ "x$list" != "x$newlist" ] ; do |
211 |
list="$newlist" |
212 |
newlist=`AddLibs "$list"` |
213 |
done |
214 |
echo $list |
215 |
} |
216 |
|
217 |
LinksAndFiles() |
218 |
{ |
219 |
local list="$@" i |
220 |
for i in $list ; do |
221 |
echo "$i" |
222 |
readlink -f "$i" |
223 |
done | sort | uniq |
224 |
} |
225 |
|
226 |
EvmsLibdir() |
227 |
{ |
228 |
local list="$@" i |
229 |
for i in $list ; do |
230 |
echo "$i" |
231 |
done | sed -n '\@/lib\(\|64\)/libevms@s@.*\(/lib\(\|64\)\)/libevms.*@\1@p' | head -n1 |
232 |
} |
233 |
|
234 |
EVMS_FILES_ALL= |
235 |
ListEvmsFilesAll() |
236 |
{ |
237 |
local list libdir list_plug list_all |
238 |
list=`AddLibs $EVMS_ACTIVATE` |
239 |
libdir=`EvmsLibdir $list` |
240 |
list_plug=`find $libdir/evms -name '*.so' | egrep -s "$EVMS_PLUGINS_REG"` |
241 |
list=`AddLibsAll $list_plug $list` |
242 |
EVMS_FILES_ALL=`LinksAndFiles $list $EVMS_CONFIG` |
243 |
} |
244 |
|
186 |
InList() |
245 |
InList() |
187 |
{ |
246 |
{ |
188 |
local value="$1" list="$2" i |
247 |
local value="$1" list="$2" i |
Lines 927-932
Link Here
|
927 |
echo $(( ($2 & 0xff) | ($1 << 8) | (($2 & ~0xff) << 12) )) |
986 |
echo $(( ($2 & 0xff) | ($1 << 8) | (($2 & ~0xff) << 12) )) |
928 |
} |
987 |
} |
929 |
/bin/mount -t proc proc /proc |
988 |
/bin/mount -t proc proc /proc |
|
|
989 |
EOF |
990 |
|
991 |
if [ -n "$HAVE_EVMS" ]; then |
992 |
Mkdir -p "$MNTDIR/dev/evms/" |
993 |
Mkdir -p "$MNTDIR/var/lock/" |
994 |
ListEvmsFilesAll |
995 |
Cp --parents -d $EVMS_FILES_ALL "$MNTDIR/" |
996 |
|
997 |
cat >>"$RCFILE" <<'EOF' |
998 |
echo mounting /dev/evms |
999 |
/bin/mount -t tmpfs -o size=16k evms /dev/evms |
1000 |
echo mounting /var/lock |
1001 |
/bin/mount -t tmpfs -o size=16k tmpfs /var/lock |
1002 |
echo Starting EVMS |
1003 |
/sbin/evms_activate |
1004 |
EOF |
1005 |
fi |
1006 |
cat >>"$RCFILE" <<'EOF' |
930 |
read cmdline </proc/cmdline |
1007 |
read cmdline </proc/cmdline |
931 |
cmdline=" $cmdline " |
1008 |
cmdline=" $cmdline " |
932 |
if test -z "${cmdline##*[ ]root=*}" ; then |
1009 |
if test -z "${cmdline##*[ ]root=*}" ; then |
Lines 968-973
Link Here
|
968 |
|
1045 |
|
969 |
fi |
1046 |
fi |
970 |
fi |
1047 |
fi |
|
|
1048 |
EOF |
1049 |
|
1050 |
if [ -n "$HAVE_EVMS" ]; then |
1051 |
cat >>"$RCFILE" <<'EOF' |
1052 |
/bin/umount /var/lock |
1053 |
/bin/umount /dev/evms |
1054 |
EOF |
1055 |
fi |
1056 |
|
1057 |
cat >>"$RCFILE" <<'EOF' |
971 |
/bin/umount /proc |
1058 |
/bin/umount /proc |
972 |
EOF |
1059 |
EOF |
973 |
|
1060 |
|
Lines 1080-1085
Link Here
|
1080 |
--preload MODULENAME load MODULENAME before all found automatically. |
1167 |
--preload MODULENAME load MODULENAME before all found automatically. |
1081 |
--with MODULENAME load MODULENAME after all found automatically. |
1168 |
--with MODULENAME load MODULENAME after all found automatically. |
1082 |
--with-raid enable software RAID (md) support. |
1169 |
--with-raid enable software RAID (md) support. |
|
|
1170 |
--with-evms enable EVMS (/dev/evms) support. |
1083 |
--omit-scsi-modules do not load any SCSI modules. |
1171 |
--omit-scsi-modules do not load any SCSI modules. |
1084 |
--omit-ide-modules do not load any IDE modules. |
1172 |
--omit-ide-modules do not load any IDE modules. |
1085 |
--omit-raid-modules do not load any raid modules. |
1173 |
--omit-raid-modules do not load any raid modules. |
Lines 1101-1107
Link Here
|
1101 |
[ -n "$1" ] && Exit "$1" || Exit |
1189 |
[ -n "$1" ] && Exit "$1" || Exit |
1102 |
} |
1190 |
} |
1103 |
|
1191 |
|
1104 |
TEMP=`getopt -n "$PROG" -o fhvd -l help,version,verbose,debug,force,ifneeded,omit-scsi-modules,omit-ide-modules,omit-raid-modules,with-raid,pause,image-version,nocompress,nobootsplash,strict,fstab:,before:,preload:,with:,after: -- "$@"` || Usage 1 |
1192 |
TEMP=`getopt -n "$PROG" -o fhvd -l help,version,verbose,debug,force,ifneeded,omit-scsi-modules,omit-ide-modules,omit-raid-modules,with-raid,with-evms,pause,image-version,nocompress,nobootsplash,strict,fstab:,before:,preload:,with:,after: -- "$@"` || Usage 1 |
1105 |
eval set -- "$TEMP" |
1193 |
eval set -- "$TEMP" |
1106 |
|
1194 |
|
1107 |
img_vers= |
1195 |
img_vers= |
Lines 1155-1160
Link Here
|
1155 |
HAVE_RAID=1 |
1243 |
HAVE_RAID=1 |
1156 |
shift |
1244 |
shift |
1157 |
;; |
1245 |
;; |
|
|
1246 |
--with-evms) |
1247 |
HAVE_EVMS=1 |
1248 |
POSTLOAD_MODNAMES="$POSTLOAD_MODNAMES $PRE_EVMS_MODNAMES" |
1249 |
shift |
1250 |
;; |
1158 |
--pause) |
1251 |
--pause) |
1159 |
pause=1 |
1252 |
pause=1 |
1160 |
shift |
1253 |
shift |