22 |
# get full path to isolinux.bin, may vary on multilib systems |
# get full path to isolinux.bin, may vary on multilib systems |
23 |
if [[ -f /usr/share/syslinux/isolinux.bin ]] |
if [[ -f /usr/share/syslinux/isolinux.bin ]] |
24 |
then |
then |
25 |
ISOLINUX_BIN=/usr/share/syslinux/isolinux.bin |
ISOLINUX_BIN="/usr/share/syslinux/isolinux.bin" |
26 |
elif [[ -f /usr/lib64/mkinitrd/isolinux.bin ]] |
elif [[ -f /usr/lib64/mkinitrd/isolinux.bin ]] |
27 |
then |
then |
28 |
ISOLINUX_BIN=/usr/lib64/mkinitrd/isolinux.bin |
ISOLINUX_BIN="/usr/lib64/mkinitrd/isolinux.bin" |
29 |
else |
else |
30 |
ISOLINUX_BIN=/usr/lib/mkinitrd/isolinux.bin |
ISOLINUX_BIN="/usr/lib/mkinitrd/isolinux.bin" |
31 |
|
fi |
32 |
|
|
33 |
|
if [[ -f /usr/share/syslinux/ldlinux.c32 ]] |
34 |
|
then |
35 |
|
LDLINUX_C32="/usr/share/syslinux/ldlinux.c32" |
36 |
|
else |
37 |
|
LDLINUX_C32="" |
38 |
fi |
fi |
39 |
|
|
40 |
die() { echo "ERROR: $@"; exit 1; } |
die() { echo "ERROR: $@"; exit 1; } |
72 |
local systemdcmd |
local systemdcmd |
73 |
|
|
74 |
case ${cmd} in |
case ${cmd} in |
75 |
add|del|default) |
add|del|default|is-enabled) |
76 |
# add given services from profile |
# add given services from profile |
77 |
if [[ -n ${services} ]] |
if [[ -n ${services} ]] |
78 |
then |
then |
85 |
case ${cmd} in |
case ${cmd} in |
86 |
add) chroot ${CDCHROOTDIR} systemctl enable ${i} ;; |
add) chroot ${CDCHROOTDIR} systemctl enable ${i} ;; |
87 |
del) chroot ${CDCHROOTDIR} systemctl disable ${i} ;; |
del) chroot ${CDCHROOTDIR} systemctl disable ${i} ;; |
88 |
|
is-enabled) chroot ${CDCHROOTDIR} systemctl is-enabled ${i} ;; |
89 |
default) |
default) |
90 |
# convert targets |
# convert targets |
91 |
case ${i} in |
case ${i} in |
191 |
[[ -x ${CDCHROOTDIR}/usr/bin/dracut ]] |
[[ -x ${CDCHROOTDIR}/usr/bin/dracut ]] |
192 |
then |
then |
193 |
install -d ${CDCHROOTDIR}/etc/dracut.conf.d || die |
install -d ${CDCHROOTDIR}/etc/dracut.conf.d || die |
194 |
echo 'add_dracutmodules+=" dmsquash-live "' \ |
echo 'add_dracutmodules+=" dmsquash-live "' > ${CDCHROOTDIR}/etc/dracut.conf.d/02-livecd.conf || die |
|
> ${CDCHROOTDIR}/etc/dracut.conf.d/02-livecd.conf || die |
|
195 |
fi |
fi |
196 |
|
|
197 |
# only on sysvinit or busybox systems |
# only on sysvinit or busybox systems |
263 |
custom_services add getty@tty1.service |
custom_services add getty@tty1.service |
264 |
custom_services add remote-fs.target |
custom_services add remote-fs.target |
265 |
# disable readahead |
# disable readahead |
266 |
custom_services del systemd-readahead-replay.service |
custom_services is-enabled systemd-readahead-replay.service && custom_services del systemd-readahead-replay.service |
267 |
custom_services del systemd-readahead-collect.service |
custom_services is-enabled systemd-readahead-collect.service && custom_services del systemd-readahead-collect.service |
268 |
fi |
fi |
269 |
|
|
270 |
# # add hardware detection |
# # add hardware detection |
401 |
# iso linux binary |
# iso linux binary |
402 |
install -d ${CDISOROOT}/isolinux |
install -d ${CDISOROOT}/isolinux |
403 |
install ${ISOLINUX_BIN} ${CDISOROOT}/isolinux || die |
install ${ISOLINUX_BIN} ${CDISOROOT}/isolinux || die |
404 |
|
if [[ -n ${LDLINUX_C32} ]] |
405 |
|
then |
406 |
|
install ${LDLINUX_C32} ${CDISOROOT}/isolinux || die |
407 |
|
fi |
408 |
|
|
409 |
# kernel |
# kernel |
410 |
# support kernel installations without symlinks |
# support kernel installations without symlinks |