about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-05-27 18:23:54 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2016-05-27 19:07:17 +0200
commitd67d0a743c934c2fc709f0cb61d0281e18ac4b9f (patch)
tree342b35645cf2097604ba104b0d85efd1ac5e786b
parent19a0f42cc48ead47243c616b2dff066f8de742ec (diff)
downloadhrmpf-d67d0a743c934c2fc709f0cb61d0281e18ac4b9f.tar.gz
hrmpf-d67d0a743c934c2fc709f0cb61d0281e18ac4b9f.tar.xz
hrmpf-d67d0a743c934c2fc709f0cb61d0281e18ac4b9f.zip
move xbps-alternatives to mkhrmpf v20160527 v20160427
-rwxr-xr-xmkhrmpf.sh1
-rw-r--r--mklive.sh.in12
2 files changed, 7 insertions, 6 deletions
diff --git a/mkhrmpf.sh b/mkhrmpf.sh
index 5ea3789..bb3c22a 100755
--- a/mkhrmpf.sh
+++ b/mkhrmpf.sh
@@ -11,4 +11,5 @@
 	-B extra/ipxe.iso \
 	-B extra/memtest86+-5.01.iso \
 	-p "$(grep '^[^#].' hrmpf.packages)" \
+	-A "gawk tnftp inetutils-hostname libressl-netcat dash vim-common" \
 	-U "spl zfs"
diff --git a/mklive.sh.in b/mklive.sh.in
index b70b9fe..80f3aad 100644
--- a/mklive.sh.in
+++ b/mklive.sh.in
@@ -66,6 +66,7 @@ Usage: $PROGNAME [options]
 
 Options:
  -a <xbps-arch>     Set XBPS_ARCH (do not use it unless you know what it is)
+ -A "pkg pkgN"      Set xbps-alternatives for packages.
  -b <system-pkg>    Set an alternative base-system package (defaults to base-system).
  -r <repo-url>      Use this XBPS repository (may be specified multiple times).
  -c <cachedir>      Use this XBPS cache directory (/var/cache/xbps if unset).
@@ -134,11 +135,9 @@ install_packages() {
     chroot $ROOTFS env -i xbps-reconfigure -a
 
     xbps-query -r $ROOTFS -l >installed.pkgs
-    xbps-alternatives -r $ROOTFS -s dash
-    xbps-alternatives -r $ROOTFS -s inetutils-hostname
-    xbps-alternatives -r $ROOTFS -s ex-vi
-    xbps-alternatives -r $ROOTFS -s libressl-netcat
-    xbps-alternatives -r $ROOTFS -s tnftp
+    for a in $ALTERNATIVES; do
+        xbps-alternatives -r $ROOTFS -s $a
+    done
     xbps-alternatives -r $ROOTFS -l >installed.alternatives
 
     if [ "$UNCONF_PACKAGE_LIST" ]; then
@@ -311,9 +310,10 @@ generate_iso_image() {
 #
 # main()
 #
-while getopts "a:B:b:r:c:C:T:Kk:l:i:I:s:S:o:p:U:h" opt; do
+while getopts "a:A:B:b:r:c:C:T:Kk:l:i:I:s:S:o:p:U:h" opt; do
     case $opt in
         a) BASE_ARCH="$OPTARG";;
+        A) ALTERNATIVES="$OPTARG";;
         b) BASE_SYSTEM_PKG="$OPTARG";;
         B) BOOT_FILES="$BOOT_FILES $OPTARG";;
         r) XBPS_REPOSITORY="--repository=$OPTARG $XBPS_REPOSITORY";;