# HG changeset patch # User Paul Boddie # Date 1558732658 -7200 # Node ID 2b586f8b40179f7894ecabb9fc9ca93d67b38a68 # Parent af4351d5e9224c92e3f4dfab56dcbfea10b63242 Added a script that attempts to connect the others to perform partitioning. diff -r af4351d5e922 -r 2b586f8b4017 makesd-partition --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/makesd-partition Fri May 24 23:17:38 2019 +0200 @@ -0,0 +1,79 @@ +#!/bin/sh + +# Support partitioning of a device using sfdisk. +# +# Important tasks: +# +# Erase bootloader blocks. +# Perform partitioning using sfdisk. + +PROGNAME=`basename "$0"` +THISDIR=`dirname "$0"` + +EXPAND="$THISDIR/makesd-expand-def" +PARTSUMMARY="$THISDIR/makesd-partition-summary" +PARTTABLE="$THISDIR/makesd-partition-table" +SFDISK="/sbin/sfdisk" + + + +# Test sfdisk behaviour and obtain useful information. + +init_sfdisk() +{ + if "$SFDISK" -uS -s "$1" > /dev/null 2>&1 ; then + SFDISK_OPTIONS="-uS -L" + else + SFDISK_OPTIONS= + fi +} + + + +# Obtain details of the selected device. + +if [ ! "$DEV" ] ; then + cat 1>&2 <&2 <&2 <