The command interpreter for this script is bourne shell #!/bin/sh. Ubuntu links /bin/sh to dash. Echo is used in this script and since there is no exectuable set for echo the builtin is used.
The echo built-in command for the dash interpreter does not have provision for the -e flag. Thus - e gets piped to fdisk during for drive partitioning statements and drive fails to be partitioned correctly.
Statements such as the bellow fail because "-" and "e" get piped to fdisk instead of just o w and n. Also the carriage returns are not sent either since the -e flag is not valid for the dash built-in echo.
echo -e 'o\nw\n' | fdisk /dev/${TARGETDRIVE} > /tmp/installquirkyfdisk.log 2>&1
two simple fixes are to use /bin/echo or just change the command interpreter to bash which seems to be the easiest fix for this problem. Script runs successfully in Ubuntu 14.04 LTS xterm using #!/bin/bash for command interpreter.
-Linuxbass
install-quirky-to-drive.sh echo problem
- BarryK
- Puppy Master
- Posts: 9392
- Joined: Mon 09 May 2005, 09:23
- Location: Perth, Western Australia
- Contact:
I don't read all of the Forum posts, mostly only monitoring this thread for Quirky feedback:
http://murga-linux.com/puppy/viewtopic. ... 725#806725
...the reply to your question is there.
http://murga-linux.com/puppy/viewtopic. ... 725#806725
...the reply to your question is there.
[url]https://bkhome.org/news/[/url]
How to submit fix?
Hi All, I'm new around here so not sure how to alert Barry about this bug and fix I've proposed.
Thanks,
~Linuxbass
Thanks,
~Linuxbass
Re: How to submit fix?
Thanks Barry, I must have been writing this question while you were responding. Cheers and thanks for the info.linuxbass wrote:Hi All, I'm new around here so not sure how to alert Barry about this bug and fix I've proposed.
Thanks,
~Linuxbass
Yea good fix using `which echo` since it's tough to be certain where an echo binary might be on any given system.
cheers!
~Linuxbass