Skip to content

Commit

Permalink
Added dos2unix programs to convert line endings from dos/windows to
Browse files Browse the repository at this point in the history
unix.

Hopefully this fixes the issues reported by johr in issue debian-pi#45 and issue debian-pi#50
reported by Limpster.
  • Loading branch information
diederikdehaas committed May 13, 2014
1 parent 8258893 commit 24da940
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ cp tmp/lib/*/libm.so.6 rootfs/lib/libm.so.6
cp tmp/lib/*/libz.so.1 rootfs/lib/libz.so.1
cp tmp/lib/*/liblzo2.so.2 rootfs/lib/liblzo2.so.2

# conversion tools for config files created on windows
cp tmp/usr/bin/dos2unix rootfs/usr/bin/dos2unix
cp tmp/usr/bin/mac2unix rootfs/usr/bin/mac2unix
cp tmp/usr/bin/unix2dos rootfs/usr/bin/unix2dos
cp tmp/usr/bin/unix2mac rootfs/usr/bin/unix2mac

cd rootfs && find . | cpio -H newc -ov > ../installer.cpio
cd ..

Expand Down
6 changes: 6 additions & 0 deletions scripts/etc/init.d/rcS
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ echo "OK"

if [ -e /bootfs/installer-config.txt ]; then
echo "Reading installer-config.txt..."
# convert line endings to unix
dos2unix /bootfs/installer-config.txt
source /bootfs/installer-config.txt
fi

Expand Down Expand Up @@ -183,6 +185,8 @@ if [ "$online_config" != "" ]; then
echo "OK"

echo "Reading online-config.txt..."
# convert line endings to unix
dos2unix /online-config.txt
source /online-config.txt
fi

Expand Down Expand Up @@ -474,6 +478,8 @@ echo "$cmdline root=$rootpartition rootfstype=$rootfstype rootwait" > /rootfs/bo
# run post install script if exists
if [ -e /bootfs/post-install.txt ]; then
echo "Running post-install.txt..."
# convert line endings to unix
dos2unix /bootfs/post-install.txt
source /bootfs/post-install.txt
fi

Expand Down
2 changes: 1 addition & 1 deletion update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ KERNEL_VERSION=3.10-3-rpi

mirror=http://archive.raspbian.org/raspbian/
release=jessie
packages="busybox-static libc6 cdebootstrap-static e2fslibs e2fsprogs libcomerr2 libblkid1 libuuid1 libgcc1 dosfstools linux-image-${KERNEL_VERSION} raspberrypi-bootloader-nokernel f2fs-tools btrfs-tools zlib1g liblzo2-2"
packages="busybox-static libc6 cdebootstrap-static e2fslibs e2fsprogs libcomerr2 libblkid1 libuuid1 libgcc1 dosfstools linux-image-${KERNEL_VERSION} raspberrypi-bootloader-nokernel f2fs-tools btrfs-tools zlib1g liblzo2-2 dos2unix"
packages_found=
packages_debs=

Expand Down

0 comments on commit 24da940

Please sign in to comment.