<div id="geary-body"><div>Thanks, that make sense :)</div><div><br></div><div>As DEV is already read as an environment variable, I think we even don't need the "~/.makesd.conf" file as the user will just need to use command like "export DEV=/dev/sdx" to set a default value for all calls to makesd.</div><div><br></div><div>Regards,</div><div>Adrien</div><div><br></div></div><div id="geary-quote"><br>Le jeu 1 mar 2018 à 18:22, Andreas Kemnade <andreas@kemnade.info> a écrit :<br><blockquote type="cite"><div class="plaintext" style="white-space: pre-wrap;">do not automatically use /dev/sdc if no device is specified
instead print usage and an error message.
Signed-off-by: Andreas Kemnade <<a href="mailto:andreas@kemnade.info">andreas@kemnade.info</a>>
---
makesd | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/makesd b/makesd
index 16767c8..4b0e6c4 100755
--- a/makesd
+++ b/makesd
@@ -15,7 +15,6 @@ CMDLINE="$0 $@" # save how makesd was called
[ "$VARIANT" ] || VARIANT=latest
[ "$ARCHITECTURE" ] || ARCHITECTURE=-armhf
[ "$DEV" ] || DEV="$(cat ~/.makesd.conf 2>/dev/null)"
-[ "$DEV" ] || DEV=/dev/sdc
function macros()
{
@@ -483,6 +482,12 @@ echo sfdisk version: $SFVER $(version $SFVER) >&2
}
### here starts real processing ###
+if [ ! "$DEV" ]
+then
+ useage
+ echo "Error: No device specified, cannot continue"
+ exit 1
+fi
for TOOL in sfdisk fdisk partprobe dd mkfs.vfat mke2fs fsck.vfat fsck.ext3 fsck
do
<div>--
</div>2.11.0
_______________________________________________
Gta04-owner mailing list
<a href="mailto:Gta04-owner@goldelico.com">Gta04-owner@goldelico.com</a>
<a href="http://lists.goldelico.com/mailman/listinfo.cgi/gta04-owner">http://lists.goldelico.com/mailman/listinfo.cgi/gta04-owner</a>
</div></blockquote></div>