Magellan Linux

Contents of /trunk/mlivecdbuild/profiles/alx-0_7_branch/common/prepare_custom

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3230 - (show annotations) (download)
Tue Sep 19 09:44:54 2023 UTC (7 months, 3 weeks ago) by niro
File size: 16085 byte(s)
-make install tarball creation more variable to be able to create root filesystems for multiple install target flavors
1 #!/bin/bash
2
3 updateconfig()
4 {
5 local variables="$@"
6 local value
7 local i
8
9 if [[ -z ${CONFIG} ]]
10 then
11 echo "You must define \$CONFIG varibale first!"
12 return 1
13 fi
14
15 for i in ${variables}
16 do
17 value="$(eval echo \${NEW_${i}})"
18 if [[ ! -z $(grep "^${i}=" ${CONFIG}) ]]
19 then
20 echo "fixing ${i} -> ${value}"
21 sed -i "s|^\(${i}=\).*|\1\"${value}\"|" ${CONFIG}
22 else
23 echo "adding ${i}=${value}"
24 echo "${i}=\"${value}\"" >> ${CONFIG}
25 fi
26 done
27 }
28
29 # prepare_custom_baseconfig $_OSROOT $_HOSTNAME $_HOSTDOMAIN
30 prepare_custom_baseconfig()
31 {
32 local _OSROOT="$1"
33 local _HOSTNAME="$2"
34 local _HOSTDOMAIN="$3"
35 if [[ -z ${_OSROOT} ]]
36 then
37 echo "no _OSROOT given"
38 return 1
39 fi
40 if [[ ! -d ${_OSROOT} ]]
41 then
42 echo "Root dir '${_OSROOT}' does not exist"
43 return 1
44 fi
45 if [[ -z ${_HOSTNAME} ]]
46 then
47 echo "no _HOSTNAME given"
48 return 1
49 fi
50 if [[ -z ${_HOSTDOMAIN} ]]
51 then
52 echo "no _HOSTDOMAIN given"
53 return 1
54 fi
55
56 # generate a new machine-id on first-boot
57 :> ${_OSROOT}/etc/machine-id
58
59 # fix localtime symlink
60 ln -snf ../usr/share/zoneinfo/Europe/Berlin ${_OSROOT}/etc/localtime
61
62 # activate timeserver via dhcp (NTP - option 42)
63 CDCHROOTDIR=${_OSROOT} custom_services add systemd-timesyncd.service
64
65 # empty root password
66 chroot ${_OSROOT} passwd -d root
67
68 # empty user password
69 chroot ${_OSROOT} passwd -d station
70
71 if [ -x ${_OSROOT}/usr/bin/mcorepasswd ] ||
72 [ -L ${_OSROOT}/usr/bin/mcorepasswd ]
73 then
74 # add mcored default user
75 ( echo "foobar"; sleep 0.1; echo "foobar" ) | chroot ${_OSROOT} /usr/bin/mcorepasswd mcore
76 fi
77
78 # fix hostname and hosts file
79 echo "${_HOSTNAME}" > ${_OSROOT}/etc/hostname
80 echo "127.0.0.1 localhost ${_HOSTNAME}.${_HOSTDOMAIN} ${_HOSTNAME}" > ${_OSROOT}/etc/hosts
81 cat >> ${_OSROOT}/etc/hosts << EOF
82 ::1 ip6-localhost ip6-loopback
83 fe00::0 ip6-localnet
84 ff00::0 ip6-mcastprefix
85 ff02::1 ip6-allnodes
86 ff02::2 ip6-allrouters
87 ff02::3 ip6-allhosts
88 EOF
89 }
90
91 # prepare_custom_installertarball $_OSROOT $_TARBALLNAME $_TARBALLTARGET
92 prepare_custom_installertarball()
93 {
94 local _OSROOT="$1"
95 local _TARBALLNAME="$2"
96 local _TARBALLTARGET="$3"
97 if [[ -z ${_OSROOT} ]]
98 then
99 echo "no _OSROOT given"
100 return 1
101 fi
102 if [[ ! -d ${_OSROOT} ]]
103 then
104 echo "Root dir '${_OSROOT}' does not exist"
105 return 1
106 fi
107 if [[ -z ${_TARBALLNAME} ]]
108 then
109 echo "no _TARBALLNAME given"
110 return 1
111 fi
112 if [[ -z ${_TARBALLTARGET} ]]
113 then
114 echo "no _TARBALLTARGET given"
115 return 1
116 fi
117
118 # create tarball
119 [[ -f ${_TARBALLTARGET}/${_TARBALLNAME}.tar.bz2 ]] && rm ${_TARBALLTARGET}/${_TARBALLNAME}.tar.bz2
120 ( cd ${_OSROOT}; tar cvjpf ${_TARBALLTARGET}/${_TARBALLNAME}.tar.bz2 ./ | tee ${LIVECDROOT}/${_TARBALLNAME}.log )
121
122 # create images.conf
123 echo "CDIMAGENAME=${_TARBALLNAME}.tar.bz2" > ${_TARBALLTARGET}/images.conf
124 echo "TOTALLINES=$(wc -l ${LIVECDROOT}/${_TARBALLNAME}.log | cut -d' ' -f1)" >> ${_TARBALLTARGET}/images.conf
125
126 # clean up
127 if [[ -z ${SKIP_REMOVE_INSTALLROOT} ]]
128 then
129 if [[ -d ${_OSROOT} ]]
130 then
131 rm -r ${_OSROOT}
132 fi
133 if [[ -f ${LIVECDROOT}/${_TARBALLNAME}.log ]]
134 then
135 rm ${LIVECDROOT}/${_TARBALLNAME}.log
136 fi
137 fi
138 }
139
140 ##
141 # create the install tarball
142 ##
143 create_install_tarball()
144 {
145 local INSTALL_BASESYSTEM
146 local INSTALL_FLAVOR
147 local INSTALL_ISOROOT
148 local INSTALL_CHROOT
149
150 INSTALL_BASESYSTEM="$1"
151 INSTALL_FLAVOR="${1//basesystem/install}"
152 INSTALL_ISOROOT="${CDISOROOT}/${INSTALL_FLAVOR//install/system}"
153 INSTALL_CHROOT="${LIVECDROOT}/${INSTALL_FLAVOR}-chroot"
154
155 if [[ -z ${INSTALL_BASESYSTEM} ]]
156 then
157 INSTALL_BASESYSTEM="basesystem"
158 INSTALL_ISOROOT="${CDISOROOT}/system"
159 INSTALL_CHROOT="${LIVECDROOT}/install-chroot"
160 fi
161
162 install -d ${INSTALL_CHROOT}
163 install -d ${INSTALL_ISOROOT}
164
165 # use all settings from the global config, but the basesystem
166 # has to be the normal install basesystem not for livecds
167 mage-bootstrap \
168 --root ${INSTALL_CHROOT} \
169 --profile ${MAGE_PROFILE} \
170 --magerc ${MAGERC} \
171 --toolchain ${TOOLCHAIN} \
172 --update-tarball \
173 --basesystem ${INSTALL_BASESYSTEM} || die "bootstrapping target system failed!"
174
175 ## DEV SERVER ##
176 # NEW_MCORE_CONTROL_SERVER="alx-control-dev.dom-aka-nt.intern"
177 # CONFIG="${INSTALL_CHROOT}/etc/mcore/mcore.conf"
178 # updateconfig MCORE_CONTROL_SERVER
179 ###
180
181 # fix missing symlink
182 if [ ! -L ${INSTALL_CHROOT}/usr/bin/X ]
183 then
184 ln -snf Xorg ${INSTALL_CHROOT}/usr/bin/X
185 fi
186
187 # remove .bash_history
188 [ -f ${INSTALL_CHROOT}/root/.bash_history ] && rm ${INSTALL_CHROOT}/root/.bash_history
189
190 # os config
191 prepare_custom_baseconfig "${INSTALL_CHROOT}" "alx-${CDOSARCH}" "magellan-linux.de"
192
193 # create tarball
194 prepare_custom_installertarball "${INSTALL_CHROOT}" "alx-${CDOSARCH}" "${INSTALL_ISOROOT}"
195 }
196
197 ##
198 # create the network image
199 ##
200 create_netboot_image()
201 {
202 local NETBOOT_BASESYSTEM
203 local NETBOOT_FLAVOR
204 local NETBOOT_ISOROOT
205 local NETBOOT_CHROOT
206 local NETBOOT_SQUASHFS
207
208 NETBOOT_BASESYSTEM="$1"
209 NETBOOT_FLAVOR="${1//system}"
210 NETBOOT_ISOROOT="${CDISOROOT}/${NETBOOT_FLAVOR}"
211 NETBOOT_CHROOT="${LIVECDROOT}/${NETBOOT_FLAVOR}-chroot"
212 NETBOOT_SQUASHFS="${LIVECDROOT}/${NETBOOT_FLAVOR}-squashfs"
213
214 if [[ -z ${NETBOOT_BASESYSTEM} ]]
215 then
216 NETBOOT_BASESYSTEM="netbootsystem"
217 NETBOOT_ISOROOT="${CDISOROOT}/netboot"
218 NETBOOT_CHROOT="${LIVECDROOT}/netboot-chroot"
219 NETBOOT_SQUASHFS="${LIVECDROOT}/netboot-squashfs"
220 fi
221
222 install -d ${NETBOOT_ISOROOT}
223 install -d ${NETBOOT_CHROOT}
224 install -d ${NETBOOT_SQUASHFS}
225
226 # use all settings from the global config, but use netbootsysten as basesystem
227 mage-bootstrap \
228 --root ${NETBOOT_CHROOT} \
229 --profile ${MAGE_PROFILE} \
230 --magerc ${MAGERC} \
231 --toolchain ${TOOLCHAIN} \
232 --update-tarball \
233 --basesystem ${NETBOOT_BASESYSTEM} || die "bootstrapping target system failed!"
234
235 # os config
236 prepare_custom_baseconfig "${NETBOOT_CHROOT}" "alx-${CDOSARCH}" "magellan-linux.de"
237
238 # creating netboot image from here on
239 install -d ${NETBOOT_SQUASHFS}/{LiveOS,mnt} || die
240
241 # fix fstab, use the livecd fstab without rootfs and swap
242 install -m 0644 $(get_profile fstab) ${NETBOOT_CHROOT}/etc/fstab || die
243
244 # remove .bash_history
245 [ -f ${NETBOOT_CHROOT}/root/.bash_history ] && rm ${NETBOOT_CHROOT}/root/.bash_history
246
247 # get the actual size of the chroot
248 size=$(du -s ${NETBOOT_CHROOT} | sed 's:^\(.*\)[[:space:]].*:\1:')
249
250 # generate a ext3fs file for devicemapper
251 dd if=/dev/zero of=${NETBOOT_SQUASHFS}/LiveOS/ext3fs.img bs=1024 count=$(( ${size} + 20000 )) || die
252 # create a filesystem
253 mkfs.ext3 -L "_${CDID}_EXT3" -m 1 -b 1024 -F ${NETBOOT_SQUASHFS}/LiveOS/ext3fs.img || die
254 # set mount_counts and check_intervals to 0
255 # set dir_index top, to speed up things with hashed b-trees
256 # allow acls too
257 tune2fs -c0 -i0 -Odir_index -ouser_xattr,acl ${NETBOOT_SQUASHFS}/LiveOS/ext3fs.img || die
258 # strip the journal
259 # tune2fs -O^has_journal ${NETBOOT_SQUASHFS}/LiveOS/ext3fs.img || die
260 # fsck after journal removal
261 # fsck ${NETBOOT_SQUASHFS}/LiveOS/ext3fs.img || die
262
263 # losetup the device
264 loopdev=$(losetup -f)
265 [[ -z ${loopdev} ]] && die "No unused loopdev found. Maybe you want 'modprobe loop'?"
266
267 # mount the image
268 losetup ${loopdev} ${NETBOOT_SQUASHFS}/LiveOS/ext3fs.img || die
269 mount ${loopdev} ${NETBOOT_SQUASHFS}/mnt || die
270
271 # copy everything to the image file and preserve permissions
272 ( cd ${NETBOOT_CHROOT} && tar cpf - . ) | ( cd ${NETBOOT_SQUASHFS}/mnt && tar xvpf - )
273 sleep 3
274
275 # now umount everything and create the squashfs image
276 umount ${NETBOOT_SQUASHFS}/mnt || die
277 losetup -d ${loopdev} || die
278 # remove mount to not ending up in the squashfs image
279 if [[ -d ${NETBOOT_SQUASHFS}/mnt ]]
280 then
281 rm -r ${NETBOOT_SQUASHFS}/mnt || die
282 fi
283 mksquashfs ${NETBOOT_SQUASHFS} ${NETBOOT_ISOROOT}/squashfs.img || die
284
285 # copy kernel, bootloader and create initramfs to isoroot/netboot
286 install -d ${NETBOOT_ISOROOT} || die
287 # kernel
288 kimg="$(find ${NETBOOT_CHROOT}/boot -name kernel-\* -printf '%f\n')"
289 install ${NETBOOT_CHROOT}/boot/${kimg} ${NETBOOT_ISOROOT}/${CDKERNELNAME} || die
290 # initrd
291 install -d ${NETBOOT_CHROOT}/etc/dracut.conf.d || die
292 echo 'add_dracutmodules+=" livenet busybox "' > ${NETBOOT_CHROOT}/etc/dracut.conf.d/03-netboot.conf || die
293 echo 'omit_dracutmodules+=" mcored "' >> ${NETBOOT_CHROOT}/etc/dracut.conf.d/03-netboot.conf || die
294 echo 'hostonly="no"' >> ${NETBOOT_CHROOT}/etc/dracut.conf.d/03-netboot.conf || die
295 # install dracut-dev package to have all modules
296 CUSTOM_PACKAGES_CHROOT="${NETBOOT_CHROOT}" custom_packages install "dracut-dev curl curl-dev" || die
297 ## mlivecdbuild function
298 INITRD_CHROOT="${NETBOOT_CHROOT}" generate_initrd
299 mv ${CDISOROOT}/isolinux/initrd.gz ${NETBOOT_ISOROOT}/ || die
300 # fix initrd permissions
301 chmod 0644 ${NETBOOT_ISOROOT}/initrd.gz || die
302 if [ -e ${NETBOOT_CHROOT}/etc/dracut.conf.d/03-netboot.conf ]
303 then
304 rm ${NETBOOT_CHROOT}/etc/dracut.conf.d/03-netboot.conf
305 fi
306
307 # bootloader pxelinux
308 install -d ${NETBOOT_ISOROOT}/pxelinux/pxelinux.cfg
309 # bios
310 [ -f $(get_profile netboot/pxelinux.0) ] && install -m0644 $(get_profile netboot/pxelinux.0) ${NETBOOT_ISOROOT}/pxelinux/
311 [ -f $(get_profile netboot/ldlinux.c32) ] && install -m0644 $(get_profile netboot/ldlinux.c32) ${NETBOOT_ISOROOT}/pxelinux/
312 # efi-x32
313 [ -f $(get_profile netboot/bootx32.efi) ] && install -m0644 $(get_profile netboot/bootx32.efi) ${NETBOOT_ISOROOT}/pxelinux/
314 [ -f $(get_profile netboot/ldlinux.e32) ] && install -m0644 $(get_profile netboot/ldlinux.e32) ${NETBOOT_ISOROOT}/pxelinux/
315 # efi-x64
316 [ -f $(get_profile netboot/bootx64.efi) ] && install -m0644 $(get_profile netboot/bootx64.efi) ${NETBOOT_ISOROOT}/pxelinux/
317 [ -f $(get_profile netboot/ldlinux.e64) ] && install -m0644 $(get_profile netboot/ldlinux.e64) ${NETBOOT_ISOROOT}/pxelinux/
318 # common pxelinux config
319 [ -f $(get_profile netboot/pxelinux.cfg/pxelinux-default) ] && install -m0644 $(get_profile netboot/pxelinux.cfg/pxelinux-default) ${NETBOOT_ISOROOT}/pxelinux/pxelinux.cfg
320 [ -f $(get_profile netboot/pxelinux.cfg/boot.cat) ] && install -m0644 $(get_profile netboot/pxelinux.cfg/boot.cat) ${NETBOOT_ISOROOT}/pxelinux/
321 [ -f $(get_profile boot.lss) ] && install -m0644 $(get_profile boot.lss) ${NETBOOT_ISOROOT}/pxelinux/
322 [ -f $(get_profile boot.msg) ] && install -m0644 $(get_profile boot.msg) ${NETBOOT_ISOROOT}/pxelinux/
323 [ -f $(get_profile debug.msg) ] && install -m0644 $(get_profile debug.msg) ${NETBOOT_ISOROOT}/pxelinux/
324 [ -f $(get_profile help.msg) ] && install -m0644 $(get_profile help.msg) ${NETBOOT_ISOROOT}/pxelinux/
325 [ -f $(get_profile index.msg) ] && install -m0644 $(get_profile index.msg) ${NETBOOT_ISOROOT}/pxelinux/
326
327 # bootloader lpxelinux
328 install -d ${NETBOOT_ISOROOT}/lpxelinux/pxelinux.cfg
329 # bios
330 [ -f $(get_profile netboot/lpxelinux.0) ] && install -m0644 $(get_profile netboot/lpxelinux.0) ${NETBOOT_ISOROOT}/lpxelinux/
331 [ -f $(get_profile netboot/ldlinux.c32) ] && install -m0644 $(get_profile netboot/ldlinux.c32) ${NETBOOT_ISOROOT}/lpxelinux/
332 # efi-x32
333 [ -f $(get_profile netboot/bootx32.efi) ] && install -m0644 $(get_profile netboot/bootx32.efi) ${NETBOOT_ISOROOT}/lpxelinux/
334 [ -f $(get_profile netboot/ldlinux.e32) ] && install -m0644 $(get_profile netboot/ldlinux.e32) ${NETBOOT_ISOROOT}/lpxelinux/
335 # efi-x64
336 [ -f $(get_profile netboot/bootx64.efi) ] && install -m0644 $(get_profile netboot/bootx64.efi) ${NETBOOT_ISOROOT}/lpxelinux/
337 [ -f $(get_profile netboot/ldlinux.e64) ] && install -m0644 $(get_profile netboot/ldlinux.e64) ${NETBOOT_ISOROOT}/lpxelinux/
338 # common lpxelinux config
339 [ -f $(get_profile netboot/pxelinux.cfg/lpxelinux-default) ] && install -m0644 $(get_profile netboot/pxelinux.cfg/lpxelinux-default) ${NETBOOT_ISOROOT}/lpxelinux/pxelinux.cfg
340 [ -f $(get_profile netboot/pxelinux.cfg/boot.cat) ] && install -m0644 $(get_profile netboot/pxelinux.cfg/boot.cat) ${NETBOOT_ISOROOT}/lpxelinux/
341 [ -f $(get_profile boot.lss) ] && install -m0644 $(get_profile boot.lss) ${NETBOOT_ISOROOT}/lpxelinux/
342 [ -f $(get_profile boot.msg) ] && install -m0644 $(get_profile boot.msg) ${NETBOOT_ISOROOT}/lpxelinux/
343 [ -f $(get_profile debug.msg) ] && install -m0644 $(get_profile debug.msg) ${NETBOOT_ISOROOT}/lpxelinux/
344 [ -f $(get_profile help.msg) ] && install -m0644 $(get_profile help.msg) ${NETBOOT_ISOROOT}/lpxelinux/
345 [ -f $(get_profile index.msg) ] && install -m0644 $(get_profile index.msg) ${NETBOOT_ISOROOT}/lpxelinux/
346
347 # final cleanup
348 if [[ -z ${SKIP_REMOVE_INSTALLROOT} ]]
349 then
350 if [[ -d ${NETBOOT_SQUASHFS} ]]
351 then
352 rm -r ${NETBOOT_SQUASHFS} || die
353 fi
354 if [[ -d ${NETBOOT_CHROOT} ]]
355 then
356 rm -r ${NETBOOT_CHROOT}
357 fi
358 fi
359 }
360
361 ##
362 # create the server tarball
363 ##
364 create_server_tarball()
365 {
366 local SERVER_BASESYSTEM
367 local SERVER_FLAVOR
368 local SERVER_ISOROOT
369 local SERVER_CHROOT
370
371 SERVER_BASESYSTEM="$1"
372 SERVER_FLAVOR="${1//system}"
373 SERVER_ISOROOT="${CDISOROOT}/${SERVER_FLAVOR}"
374 SERVER_CHROOT="${LIVECDROOT}/${SERVER_FLAVOR}-chroot"
375
376 if [[ -z ${SERVER_BASESYSTEM} ]]
377 then
378 SERVER_BASESYSTEM="serversystem"
379 SERVER_ISOROOT="${CDISOROOT}/server"
380 SERVER_CHROOT="${LIVECDROOT}/server-chroot"
381 fi
382
383 install -d ${SERVER_CHROOT}
384 install -d ${SERVER_ISOROOT}
385
386 mage-bootstrap \
387 --root ${SERVER_CHROOT} \
388 --profile ${MAGE_PROFILE} \
389 --magerc ${MAGERC} \
390 --toolchain ${TOOLCHAIN} \
391 --update-tarball \
392 --basesystem serversystem || die "bootstrapping target system failed!"
393
394 # enable getty1
395 install -d ${SERVER_CHROOT}/etc/systemd/system/getty.target.wants
396 ln -snf /usr/lib/systemd/system/getty@.service ${SERVER_CHROOT}/etc/systemd/system/getty.target.wants/getty@tty1.service
397
398 # be more verbose
399 sed -i 's:^\(export GRUB_CMDLINE_LINUX_DEFAULT=\).*:\1"rd.info":' ${SERVER_CHROOT}/etc/conf.d/grub
400
401 # remove phpmyadmin configuration directory
402 if [ -d ${SERVER_CHROOT}/usr/share/phpmyadmin/config ]
403 then
404 rm -r ${SERVER_CHROOT}/usr/share/phpmyadmin/config
405 fi
406
407 # os config
408 prepare_custom_baseconfig "${SERVER_CHROOT}" "alx-svr-${CDOSARCH}" "magellan-linux.de"
409
410 # fix certificate issues with mcored (common name of cert issuer) and >php-5.4
411 echo "127.0.0.1 mcored" >> ${SERVER_CHROOT}/etc/hosts
412
413 # remove .bash_history
414 [ -f ${SERVER_CHROOT}/root/.bash_history ] && rm ${SERVER_CHROOT}/root/.bash_history
415
416 # create tarball
417 prepare_custom_installertarball "${SERVER_CHROOT}" "alx-svr-${CDOSARCH}" "${SERVER_ISOROOT}"
418 }
419
420 # set an empty root password
421 chroot ${CDCHROOTDIR} passwd -d root
422
423 # install a custom boot-duration matching this livecd
424 install -d ${CDCHROOTDIR}/var/lib/plymouth || die
425 install -m 0644 $(get_profile boot-duration.livecd) ${CDCHROOTDIR}/var/lib/plymouth/boot-duration || die
426
427 # setup de keymap and locales
428 if [ -f ${CDCHROOTDIR}/etc/vconsole.conf ]
429 then
430 cat > ${CDCHROOTDIR}/etc/vconsole.conf << EOF || die
431 KEYMAP=de
432 KEYMAP_TOGGLE=
433 FONT=lat9w-16
434 FONT_MAP=8859-1_to_uni
435 FONT_UNIMAP=
436 EOF
437 fi
438 if [ -f ${CDCHROOTDIR}/etc/locale.conf ]
439 then
440 sed -i "s:^\(LANG=\).*:\1\"de_DE.utf8\":" ${CDCHROOTDIR}/etc/locale.conf || die
441 fi
442
443 # stop here if the user don't want to create the install tarball
444 [[ -n ${SKIP_CREATE_INSTALL_TARBALL} ]] || create_install_tarball basesystem
445 [[ -n ${SKIP_CREATE_INSTALL_TARBALL} ]] || create_install_tarball basesystem-legacy
446
447 # stop here if the user don't want to create the netboot image
448 [[ -n ${SKIP_CREATE_NETBOOT_TARBALL} ]] || create_netboot_image netbootsystem
449 [[ -n ${SKIP_CREATE_NETBOOT_TARBALL} ]] || create_netboot_image netbootsystem-legacy
450
451 # stop here if the user don't want to create the server tarball
452 [[ -n ${SKIP_CREATE_SERVER_TARBALL} ]] || create_server_tarball serversystem
453
454 # install usb-install script
455 [ ! -d ${CDISOROOT}/usb-install ] && mkdir ${CDISOROOT}/usb-install
456 [ -f $(get_profile usb-install/usb-install.cmd) ] && cp $(get_profile usb-install)/usb-install.cmd ${CDISOROOT}/usb-install
457 [ -f $(get_profile usb-install/syslinux.exe) ] && cp $(get_profile usb-install)/syslinux.exe ${CDISOROOT}/usb-install
458 [ -f $(get_profile usb-install/syslinux.cfg) ] && cp $(get_profile usb-install)/syslinux.cfg ${CDISOROOT}/usb-install
459
460 # add installer-server script
461 cat > ${CDCHROOTDIR}/usr/bin/installer-server << EOF
462 #!/bin/bash
463 /usr/bin/installer --imageroot /run/initramfs/live/server
464 EOF
465 chmod 0755 ${CDCHROOTDIR}/usr/bin/installer-server