Skip to content
Snippets Groups Projects
Commit c65e8351 authored by Diego Giovane Pasqualin's avatar Diego Giovane Pasqualin
Browse files

60-update-initrd_minicom: Apply changes made to 60-update-initrd_le5

parent 5a1058de
Branches
No related tags found
No related merge requests found
......@@ -46,13 +46,50 @@ else
unlzma -c -S .lz "$INITRD" | cpio -id
fi
# unlzma -c -S .lz $CDDIR/casper/initrd.lz | cpio -id
# Fix plymouth themes simlinks
#
# This is done because the existing references use absolute paths, and this makes
# cpio fail to follow the links. After removing the broken links
# new links are created using paths relative to the link location.
#
# For instance, originally there was this link:
# ./lib/plymouth/themes/text.plymout -> /lib/plymouth/themes/le-text/le-text.plymouth
# Since there is no /lib/plymouth/themes/le-text/le-text.plymouth on the
# system running create-iso, cpio won't find the file and will fail.
# The file the link should point to is ./lib/plymouth/themes/le-text/le-text.plymouth,
# so a new link called "text.plymouth" is created in the ./lib/plymouth/themes/ directory,
# poiting to le-text/le-text.plymouth (this works because "le-text" is in the same folder as
# the new link):
# ./lib/plymouth/themes/text.plymouth -> le-text/le-text.plymouth
if test -L ./lib/plymouth/themes/text.plymouth; then
rm -f ./lib/plymouth/themes/text.plymouth
ln -s le-text/le-text.plymouth ./lib/plymouth/themes/text.plymouth
fi
# Update initrd boot splash
#cp -af $CHROOTDIR/lib/plymouth/themes/le-logo ./lib/plymouth/themes/
#cp -af $TEMPLATES/plymouth/default.plymouth ./lib/plymouth/themes/
if test -L ./lib/plymouth/themes/default.plymouth; then
rm -f ./lib/plymouth/themes/default.plymouth
ln -s le-logo/le-logo.plymouth ./lib/plymouth/themes/default.plymouth
fi
#sed -i 's@[Uu]buntu@le5@g' ./etc/casper.conf
# Fix blacklist-oss.conf and i386-linux-gnu_GL.conf simlinks
#
# Same issue as with the plymouth/themes references, but in this case
# the files the links should point to are not part of the initramfs.
# Instead of copying the file to the correct place and
# then creating a symbolic link pointing to it, the correct file
# simply overwrites the link.
if test -L ./etc/modprobe.d/blacklist-oss.conf; then
rm -f ./etc/modprobe.d/blacklist-oss.conf
cp -af "$CHROOTDIR"/lib/linux-sound-base/noOSS.modprobe.conf ./etc/modprobe.d/blacklist-oss.conf
fi
if test -L ./etc/ld.so.conf.d/i386-linux-gnu_GL.conf; then
rm -f ./etc/ld.so.conf.d/i386-linux-gnu_GL.conf
cp -af "$CHROOTDIR"/usr/lib/i386-linux-gnu/mesa/ld.so.conf ./etc/ld.so.conf.d/i386-linux-gnu_GL.conf
fi
case "$1" in
"minicom/client")
......@@ -72,13 +109,9 @@ echo "export \"FLAVOUR=le5\"" >> ./etc/casper.conf
cp -f "$TEMPLATES"/casper/10adduser ./scripts/casper-bottom/25adduser
# Eventually cpio return some errors due to some (not important) missing
# files. So we are disabling the pipefail option and will reenable again
# after compressing the initrd file.
set +o pipefail
find | cpio --quiet --dereference -o -H newc | lzma -7 \
# Regenarete initrd image
find . -depth -print0 | cpio --quiet --dereference -o -H newc | lzma -7 \
> $CDDIR/casper/initrd.lz
set -o pipefail
cp -af $(sed 's/initrd.img/vmlinuz/g' <<< $INITRD) \
"$CDDIR"/casper/vmlinuz
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment