#!/usr/bin/perl @ARGV == 1 or die "usage: remove-splash \n"; my ($initrd) = @ARGV; # FIXME it must have a clear way to do that in perl if (!system("/bin/zcat $initrd 2> /dev/null | /bin/cpio -t &> /dev/null")) { print STDERR "remove-boot-splash: initrd in initramfs format\n"; chomp(my $tmp_dir = `mktemp -d`); chdir $tmp_dir; system("/bin/zcat $initrd 2>/dev/null | /bin/cpio -id 2>/dev/null"); if (-d "$tmp_dir/usr/share/plymouth") { system("rm -fr $tmp_dir/usr/share/plymouth $tmp_dir/usr/lib/plymouth $tmp_dir/usr/lib/libply* $tmp_dir/lib/libply* $tmp_dir/bin/plymouthd $tmp_dir/bin/plymouth $tmp_dir/etc/splashy $tmp_dir/usr/share/splashy"); print STDERR "remove-boot-splash: removing plymouth from initrd\n"; system("/bin/find . -print | /bin/cpio --quiet -c -o 2> /dev/null | gzip -c > $initrd") } else { print STDERR "ERROR remove-boot-splash: plymouth not found in $initrd\n" } system("rm -rf $tmp_dir"); exit } warn "remove-splash: format of $initrd not recognized\n";