Bug#435565: casper: Fail to run properly when /bin/sh is dash (bashism)
- Subject: Bug#435565: casper: Fail to run properly when /bin/sh is dash (bashism)
- From: pere at hungry.com (Petter Reinholdtsen)
- Date: Wed, 01 Aug 2007 18:48:02 +0200
- Message-id: <[🔎] 2flmyxbkxq5.fsf@saruman.uio.no>
Package: casper
Version: 1.77+debian-7
Severity: important
While building Live CDs for Debian Edu, I discovered messages like
this in the build log:
Setting up usplash (0.3e) ...
update-initramfs: Generating /boot/initrd.img-2.6.18-4-486
[: 43: ==: unexpected operator
cpio: ./etc/udev/rules.d/z99_hal.rules: No such file or directory
The message about == being an unexpected operator is typical for
bashism in scripts using /bin/sh when /bin/sh is dash as it is in
Debian Edu.
After trying to track down the source of this message, I found the
reason to be the casper scripts using == in several places. Here is a
list of files in /usr/share/initramfs-tools/ matching '==':
/usr/share/initramfs-tools/hooks/casper
/usr/share/initramfs-tools/scripts/casper
/usr/share/initramfs-tools/scripts/casper-helpers
/usr/share/initramfs-tools/scripts/casper-bottom/14locales
/usr/share/initramfs-tools/scripts/casper-bottom/23networking
/usr/share/initramfs-tools/scripts/casper-bottom/15autologin
/usr/share/initramfs-tools/scripts/casper-bottom/20xconfig
/usr/share/initramfs-tools/scripts/casper-bottom/10adduser
/usr/share/initramfs-tools/scripts/casper-bottom/22screensaver
Please modify these scripts to use the POSIX = test operator instead
of the bash == operator.
Happy hacking,
--
Petter Reinholdtsen
Reply to: