1.1 --- a/makesd Sat May 25 17:48:54 2019 +0200
1.2 +++ b/makesd Sat May 25 18:20:40 2019 +0200
1.3 @@ -1,6 +1,6 @@
1.4 #!/bin/sh
1.5
1.6 -# Prepare a disk for booting a hardware device.
1.7 +# Prepare a disk for booting a specific hardware device.
1.8
1.9 PROGNAME=`basename "$0"`
1.10 THISDIR=`dirname "$0"`
1.11 @@ -15,6 +15,22 @@
1.12
1.13
1.14
1.15 +# Emit the help message if requested.
1.16 +
1.17 +if [ "$1" = '--help' ] ; then
1.18 + cat 1>&2 <<EOF
1.19 +Usage: $PROGNAME [ --align ] <definition name>
1.20 +
1.21 +Partition, format, populate and initialise a device for use with a particular
1.22 +kind of hardware. The given definition name is used to search the database of
1.23 +supported hardware devices and to configure the different preparation
1.24 +activities.
1.25 +
1.26 +$(align_cylinder_description)
1.27 +EOF
1.28 + exit 0
1.29 +fi
1.30 +
1.31 # Obtain details of the selected device.
1.32
1.33 check_device
2.1 --- a/makesd-common Sat May 25 17:48:54 2019 +0200
2.2 +++ b/makesd-common Sat May 25 18:20:40 2019 +0200
2.3 @@ -46,3 +46,12 @@
2.4 return 1
2.5 fi
2.6 }
2.7 +
2.8 +align_cylinder_description()
2.9 +{
2.10 + cat <<EOF
2.11 +If the --align option is specified, align partitions to cylinders for the
2.12 +satisfaction of earlier sfdisk versions that are obsessed with cylinders, heads
2.13 +and sectors.
2.14 +EOF
2.15 +}
3.1 --- a/makesd-format Sat May 25 17:48:54 2019 +0200
3.2 +++ b/makesd-format Sat May 25 18:20:40 2019 +0200
3.3 @@ -41,6 +41,24 @@
3.4
3.5
3.6
3.7 +# Emit the help message if requested.
3.8 +
3.9 +if [ "$1" = '--help' ] ; then
3.10 + cat 1>&2 <<EOF
3.11 +Usage: $PROGNAME
3.12 +
3.13 +The input for this program is supplied via standard input as a partitioning
3.14 +summary with each line providing a collection of tab-separated values. These
3.15 +values appear in the following order:
3.16 +
3.17 +<start> <size> <type>
3.18 +
3.19 +Only the type value is employed by this program. Types recognised include ext,
3.20 +ext2, ext3, ext4, fat and swap.
3.21 +EOF
3.22 + exit 0
3.23 +fi
3.24 +
3.25 # Obtain details of the selected device.
3.26
3.27 check_device
4.1 --- a/makesd-partition Sat May 25 17:48:54 2019 +0200
4.2 +++ b/makesd-partition Sat May 25 18:20:40 2019 +0200
4.3 @@ -32,6 +32,22 @@
4.4
4.5
4.6
4.7 +# Emit the help message if requested.
4.8 +
4.9 +if [ "$1" = '--help' ] ; then
4.10 + cat 1>&2 <<EOF
4.11 +Usage: $PROGNAME [ --align ]
4.12 +
4.13 +Partition a device according to a partitioning summary supplied via standard
4.14 +input. This summary is passed on to the partition table generator:
4.15 +
4.16 +$PARTTABLE
4.17 +
4.18 +$(align_cylinder_description)
4.19 +EOF
4.20 + exit 0
4.21 +fi
4.22 +
4.23 # Obtain details of the selected device.
4.24
4.25 check_device
5.1 --- a/makesd-partition-table Sat May 25 17:48:54 2019 +0200
5.2 +++ b/makesd-partition-table Sat May 25 18:20:40 2019 +0200
5.3 @@ -182,11 +182,16 @@
5.4
5.5 if [ "$1" = '--help' ] ; then
5.6 cat 1>&2 <<EOF
5.7 -Usage: $PROGNAME [ --align ] ( -f <type> | -p <start> | -s <size> )...
5.8 +Usage: $PROGNAME [ --align ]
5.9
5.10 Produce partition descriptions, indicating partition type, start position and
5.11 -size for each partition. Each occurrence of the -f option starts a new partition
5.12 -description.
5.13 +size for each partition.
5.14 +
5.15 +The input for this program is supplied via standard input as a partitioning
5.16 +summary with each line providing a collection of tab-separated values. These
5.17 +values appear in the following order:
5.18 +
5.19 +<start> <size> <type>
5.20
5.21 Start positions are indicated as numbers of 512-byte sectors.
5.22
5.23 @@ -196,9 +201,7 @@
5.24 Types recognised include ext, ext2, ext3, ext4, fat and swap. Other types are
5.25 interpreted as Linux partitions.
5.26
5.27 -If the --align option is specified, align partitions to cylinders for the
5.28 -satisfaction of earlier sfdisk versions that are obsessed with cylinders, heads
5.29 -and sectors.
5.30 +$(align_cylinder_description)
5.31 EOF
5.32 exit 0
5.33 fi