aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2016-11-02 22:28:23 +0100
committerJakub Jirutka <jakub@jirutka.cz>2016-11-02 23:12:27 +0100
commit281cbbd6cd8ecfc3d5c1a365ae01f2e49ad25f24 (patch)
tree9bf3e352b97c7d3742c94b31d7d2e6886dc001b1
parent07c02f672a5708e4dcd9ed9aa3935840916f4c6e (diff)
downloadalpine-conf-281cbbd6cd8ecfc3d5c1a365ae01f2e49ad25f24.tar.bz2
alpine-conf-281cbbd6cd8ecfc3d5c1a365ae01f2e49ad25f24.tar.xz
indent heredocs and replace echos with heredoc where appropriate
-rw-r--r--lbu.in210
-rw-r--r--setup-acf.in50
-rw-r--r--setup-alpine.in88
-rw-r--r--setup-apkcache.in26
-rw-r--r--setup-apkrepos.in26
-rw-r--r--setup-bootable.in34
-rw-r--r--setup-disk.in120
-rw-r--r--setup-dns.in16
-rw-r--r--setup-gparted-desktop.in56
-rw-r--r--setup-hostname.in14
-rw-r--r--setup-interfaces.in60
-rw-r--r--setup-lbu.in16
-rw-r--r--setup-ntp.in14
-rw-r--r--setup-proxy.in16
-rw-r--r--setup-sshd.in14
-rw-r--r--setup-timezone.in18
-rw-r--r--update-conf.in20
-rw-r--r--update-kernel.in32
18 files changed, 420 insertions, 410 deletions
diff --git a/lbu.in b/lbu.in
index 1cd767e..fe53d81 100644
--- a/lbu.in
+++ b/lbu.in
@@ -33,28 +33,29 @@ fi
UMOUNT_LIST=
usage() {
- echo "$PROGRAM $VERSION"
- echo "usage: $PROGRAM <subcommand> [options] [args]
-
-Available subcommands:
- commit (ci)
- diff
- exclude (ex, delete)
- include (inc, add)
- list (ls)
- list-backup (lb)
- migrate_include_exclude
- package (pkg)
- revert
- status (stat, st)
-
-
-
-Common options:
- -h Show help for subcommand.
- -q Quiet mode.
- -v Verbose mode.
-"
+ cat <<-__EOF__
+ $PROGRAM $VERSION"
+ usage: $PROGRAM <subcommand> [options] [args]
+
+ Available subcommands:
+ commit (ci)
+ diff
+ exclude (ex, delete)
+ include (inc, add)
+ list (ls)
+ list-backup (lb)
+ migrate_include_exclude
+ package (pkg)
+ revert
+ status (stat, st)
+
+
+
+ Common options:
+ -h Show help for subcommand.
+ -q Quiet mode.
+ -v Verbose mode.
+ __EOF__
exit 1
}
@@ -219,17 +220,18 @@ unpack_apkovl() {
# lbu_include - add/remove files to include list
#
usage_include() {
- echo "$PROGRAM $VERSION
-Add filename(s) to include list ($sysconfdir/include)
-
-usage: $PROGRAM include|inc|add [-rv] <file> ...
- $PROGRAM include|inc|add [-v] -l
-
-Options:
- -l List contents of include list.
- -r Remove specified file(s) from include list instead of adding.
- -v Verbose mode.
-"
+ cat <<-__EOF__
+ $PROGRAM $VERSION
+ Add filename(s) to include list ($sysconfdir/include)
+
+ usage: $PROGRAM include|inc|add [-rv] <file> ...
+ $PROGRAM include|inc|add [-v] -l
+
+ Options:
+ -l List contents of include list.
+ -r Remove specified file(s) from include list instead of adding.
+ -v Verbose mode.
+ __EOF__
exit 1
}
@@ -261,23 +263,24 @@ show_include() {
# lbu_package - create a package
#
usage_package() {
- echo "$PROGRAM $VERSION
-Create backup package.
+ cat <<-__EOF__
+ $PROGRAM $VERSION
+ Create backup package.
-usage: $PROGRAM package|pkg -v [<dirname>|<filename>]
+ usage: $PROGRAM package|pkg -v [<dirname>|<filename>]
-Options:
- -v Verbose mode.
+ Options:
+ -v Verbose mode.
-If <dirname> is a directory, a package named <hostname>.apkovl.tar.gz will
-be created in the specified directory.
+ If <dirname> is a directory, a package named <hostname>.apkovl.tar.gz will
+ be created in the specified directory.
-If <filename> is specified, and is not a direcotry, a package with the
-specified name willbe created.
+ If <filename> is specified, and is not a direcotry, a package with the
+ specified name willbe created.
-If <dirname> nor <filename> is not specified, a package named
-<hostname>.apkovl.tar.gz will be created in current work directory.
-"
+ If <dirname> nor <filename> is not specified, a package named
+ <hostname>.apkovl.tar.gz will be created in current work directory.
+ __EOF__
exit 1
}
@@ -371,11 +374,12 @@ cmd_package() {
# lbu list - list files that would go to archive
#
usage_list() {
- echo "$PROGRAM $VERSION
-Lists files that would go to tar package. Same as: 'lbu package -v /dev/null'
+ cat <<-__EOF__
+ $PROGRAM $VERSION
+ Lists files that would go to tar package. Same as: 'lbu package -v /dev/null'
-usage: $PROGRAM list|ls
-"
+ usage: $PROGRAM list|ls
+ __EOF__
exit 1
}
@@ -388,31 +392,32 @@ cmd_list() {
# lbu_commit - commit config files to writeable media
#
usage_commit() {
- echo "$PROGRAM $VERSION
-Create a backup of config to writeable media.
+ cat <<-__EOF__
+ $PROGRAM $VERSION
+ Create a backup of config to writeable media.
-usage: $PROGRAM commit|ci [-nv] [<media>]
+ usage: $PROGRAM commit|ci [-nv] [<media>]
-Options:
- -d Remove old apk overlay files.
- -e Protect configuration with a password.
- -n Don't commit, just show what would have been commited.
- -p <password> Give encryption password on the command-line
- -v Verbose mode.
+ Options:
+ -d Remove old apk overlay files.
+ -e Protect configuration with a password.
+ -n Don't commit, just show what would have been commited.
+ -p <password> Give encryption password on the command-line
+ -v Verbose mode.
-The following values for <media> is supported: floppy usb
-If <media> is not specified, the environment variable LBU_BACKUPDIR or
-LBU_MEDIA will be used. If LBU_BACKUPDIR is set, nothing will be mounted.
+ The following values for <media> is supported: floppy usb
+ If <media> is not specified, the environment variable LBU_BACKUPDIR or
+ LBU_MEDIA will be used. If LBU_BACKUPDIR is set, nothing will be mounted.
-Password protection will use $DEFAULT_CIPHER encryption. Other ciphers can be
-used by setting the DEFAULT_CIPHER or ENCRYPTION environment variables.
-For possible ciphers, try: openssl -v
+ Password protection will use $DEFAULT_CIPHER encryption. Other ciphers can be
+ used by setting the DEFAULT_CIPHER or ENCRYPTION environment variables.
+ For possible ciphers, try: openssl -v
-The password used to encrypt the file, can either be specified with the -p
-option or using the PASSWORD environment variable.
+ The password used to encrypt the file, can either be specified with the -p
+ option or using the PASSWORD environment variable.
-The environment variables can also be set in $LBU_CONF
-"
+ The environment variables can also be set in $LBU_CONF
+ __EOF__
exit 1
}
@@ -505,17 +510,18 @@ cmd_commit() {
# lbu_exclude - add remove file(s) from exclude list
usage_exclude() {
- echo "$PROGRAM $VERSION
-Add filename(s) to exclude list ($sysconfdir/exclude)
-
-usage: $PROGRAM exclude|ex|delete [-rv] <file> ...
- $PROGRAM exclude|ex|delete [-v] -l
-
-Options:
- -l List contents of exclude list.
- -r Remove specified file(s) from exclude list instead of adding.
- -v Verbose mode.
-"
+ cat <<-__EOF__
+ $PROGRAM $VERSION
+ Add filename(s) to exclude list ($sysconfdir/exclude)
+
+ usage: $PROGRAM exclude|ex|delete [-rv] <file> ...
+ $PROGRAM exclude|ex|delete [-v] -l
+
+ Options:
+ -l List contents of exclude list.
+ -r Remove specified file(s) from exclude list instead of adding.
+ -v Verbose mode.
+ __EOF__
exit 1
}
@@ -546,13 +552,13 @@ show_exclude() {
#---------------------------------------------------------------------------
# lbu_listbackup - Show old commits
usage_listbackup() {
- cat <<EOF
-$PROGRAM $VERSION
-Show old commits.
+ cat <<-__EOF__
+ $PROGRAM $VERSION
+ Show old commits.
-usage: $PROGRAM list-backup [<media>]
+ usage: $PROGRAM list-backup [<media>]
-EOF
+ __EOF__
exit 1
}
@@ -570,15 +576,15 @@ cmd_listbackup() {
#---------------------------------------------------------------------------
# lbu_revert - revert to old config
usage_revert() {
- cat <<EOF
-$PROGRAM $VERSION
-Revert to older commit.
+ cat <<-__EOF__
+ $PROGRAM $VERSION
+ Revert to older commit.
-usage: $PROGRAM revert <REVISION> [<media>]
+ usage: $PROGRAM revert <REVISION> [<media>]
-The revision should be one of the files listed by 'lbu list-backup'.
+ The revision should be one of the files listed by 'lbu list-backup'.
-EOF
+ __EOF__
}
cmd_revert() {
@@ -601,15 +607,16 @@ cmd_revert() {
#---------------------------------------------------------------------------
# lbu_status - check what files have been changed since last save
usage_status() {
- echo "$PROGRAM $VERSION
-Check what files have been changed since last commit.
+ cat <<-__EOF__
+ $PROGRAM $VERSION
+ Check what files have been changed since last commit.
-usage: $PROGRAM status|st [-av]
+ usage: $PROGRAM status|st [-av]
-Options:
- -a Compare all files, not just since last commit.
- -v Also show include and exclude lists.
-"
+ Options:
+ -a Compare all files, not just since last commit.
+ -v Also show include and exclude lists.
+ __EOF__
exit 1
}
@@ -663,11 +670,12 @@ cmd_status() {
#-----------------------------------------------------------
# lbu_diff - run a diff against last commit
usage_diff() {
- echo "$PROGRAM $VERSION
-Run a diff against last commit
+ cat <<-__EOF__
+ $PROGRAM $VERSION
+ Run a diff against last commit
-usage: $PROGRAM diff [<media>]
-"
+ usage: $PROGRAM diff [<media>]
+ __EOF__
exit 1
}
diff --git a/setup-acf.in b/setup-acf.in
index 46e3529..23ef687 100644
--- a/setup-acf.in
+++ b/setup-acf.in
@@ -62,22 +62,22 @@ if [ -f $PEMFILE ]; then
echo "$PEMFILE already exist."
else
mkdir -p $SSLDIR
-cat >$SSLCNF <<EOF
-[ req ]
-default_bits = 1024
-encrypt_key = yes
-distinguished_name = req_dn
-x509_extensions = cert_type
-prompt = no
-
-[ req_dn ]
-OU=HTTPS server
-CN=$(hostname -f || hostname)
-emailAddress=${EMAIL:-postmaster@example.com}
-
-[ cert_type ]
-nsCertType = server
-EOF
+ cat >$SSLCNF <<-__EOF__
+ [ req ]
+ default_bits = 1024
+ encrypt_key = yes
+ distinguished_name = req_dn
+ x509_extensions = cert_type
+ prompt = no
+
+ [ req_dn ]
+ OU=HTTPS server
+ CN=$(hostname -f || hostname)
+ emailAddress=${EMAIL:-postmaster@example.com}
+
+ [ cert_type ]
+ nsCertType = server
+ __EOF__
echo "Generating certificates for HTTPS..."
openssl genrsa 2048 > $KEYFILE
openssl req -new -x509 -nodes -sha1 -days 3650 -key $KEYFILE \
@@ -87,15 +87,15 @@ EOF
mv $CRTFILE $PEMFILE
fi
-cat >/etc/mini_httpd/mini_httpd.conf <<EOF
-nochroot
-dir=/var/www/localhost/htdocs
-user=nobody
-cgipat=cgi-bin**
-certfile=$PEMFILE
-port=443
-ssl
-EOF
+cat >/etc/mini_httpd/mini_httpd.conf <<-__EOF__
+ nochroot
+ dir=/var/www/localhost/htdocs
+ user=nobody
+ cgipat=cgi-bin**
+ certfile=$PEMFILE
+ port=443
+ ssl
+__EOF__
if [ -n "$address" ]; then
echo "host=$address" >> /etc/mini_httpd/mini_httpd.conf
fi
diff --git a/setup-alpine.in b/setup-alpine.in
index efd6d4a..8b1d947 100644
--- a/setup-alpine.in
+++ b/setup-alpine.in
@@ -21,18 +21,18 @@ is_qemu() {
}
usage() {
- cat <<__EOF__
-usage: setup-alpine [-ahq] [-c FILE | -f FILE]
-
-Setup Alpine Linux
-
-options:
- -a Create Alpine Linux overlay file
- -c Create answer file (do not install anything)
- -f Answer file to use installation
- -h Show this help
- -q Quick mode. Ask fewer questions.
-__EOF__
+ cat <<-__EOF__
+ usage: setup-alpine [-ahq] [-c FILE | -f FILE]
+
+ Setup Alpine Linux
+
+ options:
+ -a Create Alpine Linux overlay file
+ -c Create answer file (do not install anything)
+ -f Answer file to use installation
+ -h Show this help
+ -q Quick mode. Ask fewer questions.
+ __EOF__
exit 1
}
@@ -63,51 +63,51 @@ fi
if [ "$CREATEANSWERFILE" != "" ]; then
touch "$CREATEANSWERFILE" || echo "Cannot touch file $CREATEANSWERFILE"
- cat <<__EOF__ > "$CREATEANSWERFILE"
-# Example answer file for setup-alpine script
-# If you don't want to use a certain option, then comment it out
+ cat > "$CREATEANSWERFILE" <<-__EOF__
+ # Example answer file for setup-alpine script
+ # If you don't want to use a certain option, then comment it out
-# Use US layout with US variant
-KEYMAPOPTS="us us"
+ # Use US layout with US variant
+ KEYMAPOPTS="us us"
-# Set hostname to alpine-test
-HOSTNAMEOPTS="-n alpine-test"
+ # Set hostname to alpine-test
+ HOSTNAMEOPTS="-n alpine-test"
-# Contents of /etc/network/interfaces
-INTERFACESOPTS="auto lo
-iface lo inet loopback
+ # Contents of /etc/network/interfaces
+ INTERFACESOPTS="auto lo
+ iface lo inet loopback
-auto eth0
-iface eth0 inet dhcp
- hostname alpine-test
-"
+ auto eth0
+ iface eth0 inet dhcp
+ hostname alpine-test
+ "
-# Search domain of example.com, Google public nameserver
-DNSOPTS="-d example.com 8.8.8.8"
+ # Search domain of example.com, Google public nameserver
+ DNSOPTS="-d example.com 8.8.8.8"
-# Set timezone to UTC
-TIMEZONEOPTS="-z UTC"
+ # Set timezone to UTC
+ TIMEZONEOPTS="-z UTC"
-# set http/ftp proxy
-PROXYOPTS="http://webproxy:8080"
+ # set http/ftp proxy
+ PROXYOPTS="http://webproxy:8080"
-# Add a random mirror
-APKREPOSOPTS="-r"
+ # Add a random mirror
+ APKREPOSOPTS="-r"
-# Install Openssh
-SSHDOPTS="-c openssh"
+ # Install Openssh
+ SSHDOPTS="-c openssh"
-# Use openntpd
-NTPOPTS="-c openntpd"
+ # Use openntpd
+ NTPOPTS="-c openntpd"
-# Use /dev/sda as a data disk
-DISKOPTS="-m data /dev/sda"
+ # Use /dev/sda as a data disk
+ DISKOPTS="-m data /dev/sda"
-# Setup in /media/sdb1
-LBUOPTS="/media/sdb1"
-APKCACHEOPTS="/media/sdb1/cache"
+ # Setup in /media/sdb1
+ LBUOPTS="/media/sdb1"
+ APKCACHEOPTS="/media/sdb1/cache"
-__EOF__
+ __EOF__
echo "Answer file $CREATEANSWERFILE has been created. Please add or remove options as desired in that file"
exit 0
fi
diff --git a/setup-apkcache.in b/setup-apkcache.in
index d4bfb39..1479dba 100644
--- a/setup-apkcache.in
+++ b/setup-apkcache.in
@@ -5,16 +5,16 @@ PREFIX=
. "$PREFIX/lib/libalpine.sh"
usage() {
- cat <<__EOF__
-usage: setup-apkcache [-h] [DIR]
+ cat <<-__EOF__
+ usage: setup-apkcache [-h] [DIR]
-Setup apk caching.
+ Setup apk caching.
-If DIR is not specified user will be asked for location.
+ If DIR is not specified user will be asked for location.
-options:
- -h Show this help
-__EOF__
+ options:
+ -h Show this help
+ __EOF__
exit 1
}
@@ -85,15 +85,15 @@ mount_fstype() {
}
apk_cache_help() {
- cat <<__EOF__
+ cat <<-__EOF__
-Packages installed from network can be cached locally to be available during
-boot, before the network is started. Specifying a directory here will make apk
-cache the packages locally in this directory.
+ Packages installed from network can be cached locally to be available during
+ boot, before the network is started. Specifying a directory here will make apk
+ cache the packages locally in this directory.
-Enter 'none' if you do not want to cache packages from network.
+ Enter 'none' if you do not want to cache packages from network.
-__EOF__
+ __EOF__
}
while getopts "h" opt; do
diff --git a/setup-apkrepos.in b/setup-apkrepos.in
index 455dc20..f15a886 100644
--- a/setup-apkrepos.in
+++ b/setup-apkrepos.in
@@ -15,10 +15,12 @@ get_hostname_from_url() {
}
prompt_setup_method() {
- echo "r) Add random from the above list"
- echo "f) Detect and add fastest mirror from above list"
- echo "e) Edit "${ROOT}"etc/apk/repositores with text editor"
- echo ""
+ cat <<-__EOF__
+ r) Add random from the above list
+ f) Detect and add fastest mirror from above list
+ e) Edit "${ROOT}"etc/apk/repositores with text editor
+
+ __EOF__
echo -n "Enter mirror number (1-$mirror_count) or URL to add (or r/f/e/done) [$1]: "
}
@@ -143,16 +145,16 @@ edit_repositories() {
}
usage() {
- cat <<__EOF__
-usage: setup-apkrepos [-fhr] [REPO...]
+ cat <<-__EOF__
+ usage: setup-apkrepos [-fhr] [REPO...]
-Setup apk repositories
+ Setup apk repositories
-options:
- -f Detect and add fastest mirror
- -h Show this help
- -r Add a random mirror and do not prompt
-__EOF__
+ options:
+ -f Detect and add fastest mirror
+ -h Show this help
+ -r Add a random mirror and do not prompt
+ __EOF__
exit 1
}
diff --git a/setup-bootable.in b/setup-bootable.in
index b2c6796..4a83f5a 100644
--- a/setup-bootable.in
+++ b/setup-bootable.in
@@ -161,28 +161,28 @@ check_syslinux() {
}
usage() {
- cat <<__EOF__
-$prog $version
-usage: $prog [-fhUusv] SOURCE [DEST]
- $prog -c DIR
+ cat <<-__EOF__
+ $prog $version
+ usage: $prog [-fhUusv] SOURCE [DEST]
+ $prog -c DIR
-Copy the contents of SOURCE to DEST and make DEST bootable.
+ Copy the contents of SOURCE to DEST and make DEST bootable.
-SOURCE can be a directory or a ISO image. DEST can be a mounted directory
-or a device. If DEST is ommitted /media/usb will be used.
+ SOURCE can be a directory or a ISO image. DEST can be a mounted directory
+ or a device. If DEST is ommitted /media/usb will be used.
-Options:
- -f Force overwrite existing files. Will overwrite syslinux.cfg if upgrade.
- -h Show this help.
- -k fix kernel and initrd name in syslinux.cfg if needed.
- -U Replace current alpine_dev in syslinux.cfg with UUID if UUID found.
- -u Upgrade mode. Keep existing syslinux.cfg and don't run syslinux.
- -s Force run syslinux, even if upgrade mode.
- -v Verbose mode. Display whats going on.
+ Options:
+ -f Force overwrite existing files. Will overwrite syslinux.cfg if upgrade.
+ -h Show this help.
+ -k fix kernel and initrd name in syslinux.cfg if needed.
+ -U Replace current alpine_dev in syslinux.cfg with UUID if UUID found.
+ -u Upgrade mode. Keep existing syslinux.cfg and don't run syslinux.
+ -s Force run syslinux, even if upgrade mode.
+ -v Verbose mode. Display whats going on.
- -c Check syslinux.cfg in destination DIR. Use with -f to fix.
+ -c Check syslinux.cfg in destination DIR. Use with -f to fix.
-__EOF__
+ __EOF__
exit 1
}
diff --git a/setup-disk.in b/setup-disk.in
index 7fbf080..588d37f 100644
--- a/setup-disk.in
+++ b/setup-disk.in
@@ -311,11 +311,11 @@ install_mounted_root() {
echo -e "${SWAP_DEVICE}\tswap\tswap\tdefaults\t0 0" \
>> "$mnt"/etc/fstab
fi
- cat >>"$mnt"/etc/fstab <<EOF
-/dev/cdrom /media/cdrom iso9660 noauto,ro 0 0
-/dev/fd0 /media/floppy vfat noauto 0 0
-/dev/usbdisk /media/usb vfat noauto 0 0
-EOF
+ cat >>"$mnt"/etc/fstab <<-__EOF__
+ /dev/cdrom /media/cdrom iso9660 noauto,ro 0 0
+ /dev/fd0 /media/floppy vfat noauto 0 0
+ /dev/usbdisk /media/usb vfat noauto 0 0
+ __EOF__
# remove the installed db in case its there so we force re-install
rm -f "$mnt"/var/lib/apk/installed "$mnt"/lib/apk/db/installed
echo "Installing system on $rootdev:"
@@ -838,46 +838,46 @@ native_disk_install() {
}
diskselect_help() {
- cat <<__EOF__
+ cat <<-__EOF__
-The disk you select can be used for a traditional disk install or for a
-data-only install.
+ The disk you select can be used for a traditional disk install or for a
+ data-only install.
-The disk will be erased.
+ The disk will be erased.
-Enter 'none' if you want to run diskless.
+ Enter 'none' if you want to run diskless.
-__EOF__
+ __EOF__
}
diskmode_help() {
- cat <<__EOF__
+ cat <<-__EOF__
-You can select between 'sys', 'data', 'lvm', 'lvmsys' or 'lvmdata'.
+ You can select between 'sys', 'data', 'lvm', 'lvmsys' or 'lvmdata'.
-sys:
- This mode is a traditional disk install. The following partitions will be
- created on the disk: /boot, / (filesystem root) and swap.
+ sys:
+ This mode is a traditional disk install. The following partitions will be
+ created on the disk: /boot, / (filesystem root) and swap.
- This mode may be used for development boxes, desktops, virtual servers, etc.
+ This mode may be used for development boxes, desktops, virtual servers, etc.
-data:
- This mode uses your disk(s) for data storage, not for the operating system.
- The system itself will run from tmpfs (RAM).
+ data:
+ This mode uses your disk(s) for data storage, not for the operating system.
+ The system itself will run from tmpfs (RAM).
- Use this mode if you only want to use the disk(s) for a mailspool, databases,
- logs, etc.
+ Use this mode if you only want to use the disk(s) for a mailspool, databases,
+ logs, etc.
-lvm:
- Enable logical volume manager and ask again for 'sys' or 'data'.
+ lvm:
+ Enable logical volume manager and ask again for 'sys' or 'data'.
-lvmsys:
- Same as 'sys' but use logical volume manager for partitioning.
+ lvmsys:
+ Same as 'sys' but use logical volume manager for partitioning.
-lvmdata:
- Same as 'data' but use logical volume manager for partitioning.
+ lvmdata:
+ Same as 'data' but use logical volume manager for partitioning.
-__EOF__
+ __EOF__
}
# ask for a root or data disk
@@ -910,37 +910,37 @@ ask_disk() {
}
usage() {
- cat <<__EOF__
-usage: setup-disk [-hLqrv] [-k kernelflavor] [-m MODE] [-o apkovl] [-s SWAPSIZE]
- [MOUNTPOINT | DISKDEV...]
-
-Install alpine on harddisk.
-
-If MOUNTPOINT is specified, then do a traditional disk install with MOUNTPOINT
-as root.
-
-If DISKDEV is specified, then use the specified disk(s) without asking. If
-multiple disks are specified then set them up in a RAID array. If there are
-mode than 2 disks, then use raid level 5 instead of raid level 1.
-
-options:
- -h Show this help
- -m Use disk for MODE without asking, where MODE is either 'data' or 'sys'
- -o Restore system from given apkovl file
- -k Use kernelflavor instead of $KERNEL_FLAVOR
- -L Use LVM to manage partitions
- -q Exit quietly if no disks are found
- -r Enable software raid1 with single disk
- -s Use SWAPSIZE MB instead of autodetecting swap size (Use 0 to disable swap)
- -v Be more verbose about what is happening
-
-If BOOTFS, ROOTFS, VARFS are specified, then format a partition with specified
-filesystem. If not specified, the default filesystem is ext4.
-Supported filesystems for
- boot: ext2, ext3, ext4, btrfs
- root: ext2, ext3, ext4, btrfs, xfs
- var: ext2, ext3, ext4, btrfs, xfs
-__EOF__
+ cat <<-__EOF__
+ usage: setup-disk [-hLqrv] [-k kernelflavor] [-m MODE] [-o apkovl] [-s SWAPSIZE]
+ [MOUNTPOINT | DISKDEV...]
+
+ Install alpine on harddisk.
+
+ If MOUNTPOINT is specified, then do a traditional disk install with MOUNTPOINT
+ as root.
+
+ If DISKDEV is specified, then use the specified disk(s) without asking. If
+ multiple disks are specified then set them up in a RAID array. If there are
+ mode than 2 disks, then use raid level 5 instead of raid level 1.
+
+ options:
+ -h Show this help
+ -m Use disk for MODE without asking, where MODE is either 'data' or 'sys'
+ -o Restore system from given apkovl file
+ -k Use kernelflavor instead of $KERNEL_FLAVOR
+ -L Use LVM to manage partitions
+ -q Exit quietly if no disks are found
+ -r Enable software raid1 with single disk
+ -s Use SWAPSIZE MB instead of autodetecting swap size (Use 0 to disable swap)
+ -v Be more verbose about what is happening
+
+ If BOOTFS, ROOTFS, VARFS are specified, then format a partition with specified
+ filesystem. If not specified, the default filesystem is ext4.
+ Supported filesystems for
+ boot: ext2, ext3, ext4, btrfs
+ root: ext2, ext3, ext4, btrfs, xfs
+ var: ext2, ext3, ext4, btrfs, xfs
+ __EOF__
exit 1
}
diff --git a/setup-dns.in b/setup-dns.in
index 18a6470..9b3a44f 100644
--- a/setup-dns.in
+++ b/setup-dns.in
@@ -4,17 +4,17 @@ PREFIX=
. "$PREFIX/lib/libalpine.sh"
usage() {
- cat <<__EOF__
-usage: setup-dns [-h] [-d domain name] [IPADDR...]
+ cat <<-__EOF__
+ usage: setup-dns [-h] [-d domain name] [IPADDR...]
-Setup ${ROOT}etc/resolv.conf DNS settings
+ Setup ${ROOT}etc/resolv.conf DNS settings
-options:
- -h Show this help
- -d specify search domain name
+ options:
+ -h Show this help
+ -d specify search domain name
-The optional IPADDR are a list of DNS servers to use.
-__EOF__
+ The optional IPADDR are a list of DNS servers to use.
+ __EOF__
exit 1
}
diff --git a/setup-gparted-desktop.in b/setup-gparted-desktop.in
index 849aacc..a5f2f1b 100644
--- a/setup-gparted-desktop.in
+++ b/setup-gparted-desktop.in
@@ -4,37 +4,37 @@ setup-xorg-base gparted xinit st openbox ttf-freefont $@
# create openbox menu
mkdir -p ~/.config/openbox
-cat >~/.config/openbox/menu.xml<<EOF
-<?xml version="1.0" encoding="UTF-8"?>
+cat >~/.config/openbox/menu.xml<<-__EOF__
+ <?xml version="1.0" encoding="UTF-8"?>
-<openbox_menu xmlns="http://openbox.org/3.4/menu">
-<menu id="root-menu" label="Openbox 3">
- <separator label="Applications" />
- <item label="GParted">
- <action name="Execute">
- <command>gparted</command>
- </action>
- </item>
- <item label="aterm">
- <action name="Execute">
- <command>aterm</command>
- </action>
- </item>
- <separator />
- <item label="Log Out">
- <action name="Exit">
- <prompt>yes</prompt>
- </action>
- </item>
-</menu>
-</openbox_menu>
-EOF
+ <openbox_menu xmlns="http://openbox.org/3.4/menu">
+ <menu id="root-menu" label="Openbox 3">
+ <separator label="Applications" />
+ <item label="GParted">
+ <action name="Execute">
+ <command>gparted</command>
+ </action>
+ </item>
+ <item label="aterm">
+ <action name="Execute">
+ <command>aterm</command>
+ </action>
+ </item>
+ <separator />
+ <item label="Log Out">
+ <action name="Exit">
+ <prompt>yes</prompt>
+ </action>
+ </item>
+ </menu>
+ </openbox_menu>
+__EOF__
# create xinitrc
-cat >~/.xinitrc <<EOF
-gparted &
-exec openbox-session
-EOF
+cat >~/.xinitrc <<-__EOF__
+ gparted &
+ exec openbox-session
+__EOF__
echo ""
echo " To start GParted run: startx"
diff --git a/setup-hostname.in b/setup-hostname.in
index a6aca77..3ce7dd2 100644
--- a/setup-hostname.in
+++ b/setup-hostname.in
@@ -6,16 +6,16 @@ PREFIX=
. $PREFIX/lib/libalpine.sh
usage() {
- cat <<__EOF__
-usage: setup-hostname [-h] [HOSTNAME]
+ cat <<-__EOF__
+ usage: setup-hostname [-h] [HOSTNAME]
-Sets the system hostname.
+ Sets the system hostname.
-options:
- -h Show this help
+ options:
+ -h Show this help
-Sets hostname to HOSTNAME or prompt if unspecified.
-__EOF__
+ Sets hostname to HOSTNAME or prompt if unspecified.
+ __EOF__
exit 1
}
diff --git a/setup-interfaces.in b/setup-interfaces.in
index e57c8ce..54f0f92 100644
--- a/setup-interfaces.in
+++ b/setup-interfaces.in
@@ -79,20 +79,20 @@ get_default_gateway() {
}
ipaddr_help() {
- cat <<__EOF__
+ cat <<-__EOF__
-Select the ip address for this interface.
+ Select the ip address for this interface.
-dhcp Dynamic/automatic ip via DHCP
-none Do not add any address
-n.n.n.n (ex: 192.168.0.1) Static ip
-n.n.n.n/m (ex: 192.168.0.1/24) Static ip with mask
-br[0-9]+ (ex: br0) Add this interface to a bridge
-bridge[0-9] (ex: bridge0) Add this interface to a bridge
+ dhcp Dynamic/automatic ip via DHCP
+ none Do not add any address
+ n.n.n.n (ex: 192.168.0.1) Static ip
+ n.n.n.n/m (ex: 192.168.0.1/24) Static ip with mask
+ br[0-9]+ (ex: br0) Add this interface to a bridge
+ bridge[0-9] (ex: bridge0) Add this interface to a bridge
-You will be prompted for netmask if not specified with the address.
+ You will be prompted for netmask if not specified with the address.
-__EOF__
+ __EOF__
}
bridge_add_port() {
@@ -407,36 +407,36 @@ config_vlan() {
}
usage() {
- cat <<__EOF__
-usage: setup-interfaces [-bhi]
+ cat <<-__EOF__
+ usage: setup-interfaces [-bhi]
-Setup network interfaces
+ Setup network interfaces
-options:
- -b Ask for bridging of interfaces
- -h Show this help
- -i Read new contents of ${ROOT}etc/network/interfaces from stdin
-__EOF__
+ options:
+ -b Ask for bridging of interfaces
+ -h Show this help
+ -i Read new contents of ${ROOT}etc/network/interfaces from stdin
+ __EOF__
exit 1
}
iface_help() {
- cat <<__EOF__
+ cat <<-__EOF__
-Select the interface you wish to configure.
+ Select the interface you wish to configure.
-For advanced configurations, you can also enter:
-br[0-9]+ (ex: br0) bridge interface
-bridge[0-9]+ (ex: bridge0) bridge interface
-bond[0-9]+ (ex: bond32) bonded interface
-vlan[0-9]+ (ex: vlan371) vlan interface
-eth?.[0-9]+ (ex: eth0.371) vlan interface
-bond?.[0.9]+ (ex: bond0.371) vlan interface
+ For advanced configurations, you can also enter:
+ br[0-9]+ (ex: br0) bridge interface
+ bridge[0-9]+ (ex: bridge0) bridge interface
+ bond[0-9]+ (ex: bond32) bonded interface
+ vlan[0-9]+ (ex: vlan371) vlan interface
+ eth?.[0-9]+ (ex: eth0.371) vlan interface
+ bond?.[0.9]+ (ex: bond0.371) vlan interface
-You will be asked which physical interface(s) to
-be used for advanced configurations.
+ You will be asked which physical interface(s) to
+ be used for advanced configurations.
-__EOF__
+ __EOF__
}
prompt_for_interfaces() {
init_tmpdir TMP
diff --git a/setup-lbu.in b/setup-lbu.in
index 7270f3b..e13bd02 100644
--- a/setup-lbu.in
+++ b/setup-lbu.in
@@ -5,18 +5,18 @@ PREFIX=
. "$PREFIX/lib/libalpine.sh"
usage() {
- cat <<__EOF__
-usage: setup-lbu [-hq] [MEDIA]
+ cat <<-__EOF__
+ usage: setup-lbu [-hq] [MEDIA]
-Setup lbu media settings.
+ Setup lbu media settings.
-MEDIA is optional mountpoint under /media
+ MEDIA is optional mountpoint under /media
-options:
- -h Show this help
- -q Quietly pick best suggestion. Only prompts user if unsure.
+ options:
+ -h Show this help
+ -q Quietly pick best suggestion. Only prompts user if unsure.
-__EOF__
+ __EOF__
exit 1
}
diff --git a/setup-ntp.in b/setup-ntp.in
index 4432cbc..c88e486 100644
--- a/setup-ntp.in
+++ b/setup-ntp.in
@@ -5,15 +5,15 @@ PREFIX=
. "$PREFIX/lib/libalpine.sh"
usage() {
- cat <<__EOF__
-usage: setup-ntp [-h] [-c choice of NTP daemon]
+ cat <<-__EOF__
+ usage: setup-ntp [-h] [-c choice of NTP daemon]
-Setup NTP time synchronization
+ Setup NTP time synchronization
-options:
- -h Show this help
- -c Choice of NTP daemon: busybox openntpd chrony none
-__EOF__
+ options:
+ -h Show this help
+ -c Choice of NTP daemon: busybox openntpd chrony none
+ __EOF__
exit 1
}
diff --git a/setup-proxy.in b/setup-proxy.in
index 16b7968..f92b323 100644
--- a/setup-proxy.in
+++ b/setup-proxy.in
@@ -6,17 +6,17 @@ for i in ./libalpine.sh $PREFIX/lib/libalpine.sh; do
done
usage() {
- cat <<__EOF__
-usage: setup-proxy [-hq] [PROXYURL]
+ cat <<-__EOF__
+ usage: setup-proxy [-hq] [PROXYURL]
-Setup http proxy
+ Setup http proxy
-options:
- -h Show this help
- -q Quiet mode
+ options:
+ -h Show this help
+ -q Quiet mode
-If PROXYURL is not specified user will be prompted.
-__EOF__
+ If PROXYURL is not specified user will be prompted.
+ __EOF__
exit 1
}
diff --git a/setup-sshd.in b/setup-sshd.in
index d9ae94f..00e9bb8 100644
--- a/setup-sshd.in
+++ b/setup-sshd.in
@@ -5,15 +5,15 @@ PREFIX=
. "$PREFIX/lib/libalpine.sh"
usage() {
- cat <<__EOF__
-usage: setup-sshd [-h] [-c choice of SSH daemon]
+ cat <<-__EOF__
+ usage: setup-sshd [-h] [-c choice of SSH daemon]
-Setup sshd daemon
+ Setup sshd daemon
-options:
- -h Show this help
- -c Choice of SSH daemon: openssh dropbear none
-__EOF__
+ options:
+ -h Show this help
+ -c Choice of SSH daemon: openssh dropbear none
+ __EOF__
exit 1
}
diff --git a/setup-timezone.in b/setup-timezone.in
index 2d7b044..42e2a88 100644
--- a/setup-timezone.in
+++ b/setup-timezone.in
@@ -7,17 +7,17 @@ PREFIX=
zroot=/usr/share/zoneinfo
usage() {
- cat <<__EOF__
-usage: setup-timezone [-h] [-k|-i] [-z TIMEZONE]
+ cat <<-__EOF__
+ usage: setup-timezone [-h] [-k|-i] [-z TIMEZONE]
-Sets the timezone for the system.
+ Sets the timezone for the system.
-options:
- -h Show this help
- -i Install tzdata and symlink instead of making a copy
- -k Keep previous copies of tzdata
- -z Set given timezone. (relative $zroot)
-__EOF__
+ options:
+ -h Show this help
+ -i Install tzdata and symlink instead of making a copy
+ -k Keep previous copies of tzdata
+ -z Set given timezone. (relative $zroot)
+ __EOF__
exit 1
}
diff --git a/update-conf.in b/update-conf.in
index 4ee1a01..fd03afa 100644
--- a/update-conf.in
+++ b/update-conf.in
@@ -11,16 +11,16 @@ init_tmpdir TMPD
LBUCACHE="$TMPD/lbucache"
usage() {
- cat >&2 << __EOF__
-$PROGRAM $VERSION
-Usage: $PROGRAM [-a|--all] [-i|--initd] [-l|--list] [-h|--help]
-Options:
- -a, --all Select all updated files
- -i, --initd Use all new init.d scripts
- -l, --list List updated files
- -h, --help Show this help
-
-__EOF__
+ cat >&2 <<-__EOF__
+ $PROGRAM $VERSION
+ Usage: $PROGRAM [-a|--all] [-i|--initd] [-l|--list] [-h|--help]
+ Options:
+ -a, --all Select all updated files
+ -i, --initd Use all new init.d scripts
+ -l, --list List updated files
+ -h, --help Show this help
+
+ __EOF__
}
diff --git a/update-kernel.in b/update-kernel.in
index b529e35..d3959f8 100644
--- a/update-kernel.in
+++ b/update-kernel.in
@@ -34,22 +34,22 @@ usage() {
[ "$2" ] && error "$2"
local opts="[-F <feature>]... [-p <package>]..."
local dest_args="[-a <arch>] <dest_dir>"
- cat >&2 <<EOF
-
-Syntax: $SCRIPT $opts [$dest_args]
- $SCRIPT -f <flavor> $opts $dest_args
- $SCRIPT -b <build_dir> $opts [$dest_args]
-
-Options: -a|--arch <arch> Install kernel for specified architecture
- -b|--build <build_dir> Install custom-built kernel
- -f|--flavor <flavor> Install kernel of specified flavor
- -F|--feature <feature> Enable initfs feature
- -p|--package <package> Additional module or firmware package
- -v|--verbose Verbose output
- -K|--hostkeys Include host keys in initramfs
- --repositories-file <f> apk repositories file
-
-EOF
+ cat >&2 <<-__EOF__
+
+ Syntax: $SCRIPT $opts [$dest_args]
+ $SCRIPT -f <flavor> $opts $dest_args
+ $SCRIPT -b <build_dir> $opts [$dest_args]
+
+ Options: -a|--arch <arch> Install kernel for specified architecture
+ -b|--build <build_dir> Install custom-built kernel
+ -f|--flavor <flavor> Install kernel of specified flavor
+ -F|--feature <feature> Enable initfs feature
+ -p|--package <package> Additional module or firmware package
+ -v|--verbose Verbose output
+ -K|--hostkeys Include host keys in initramfs
+ --repositories-file <f> apk repositories file
+
+ __EOF__
exit $1
}