Commit 4954634c authored by Dubiousjim's avatar Dubiousjim Committed by Natanael Copa

various: use long-form apk options

parent c8f5f53d
......@@ -52,13 +52,13 @@ init_tmpdir() {
}
pkg_inst() {
eecho "warning: pkg_inst is deprecated. Use 'apk add -q' in script"
[ -z "$NOCOMMIT" ] && apk add -q $*
eecho "warning: pkg_inst is deprecated. Use 'apk add --quiet' in script"
[ -z "$NOCOMMIT" ] && apk add --quiet $*
}
pkg_deinst() {
eecho "warning: pkg_deinst is deprecated. Use 'apk del -q' in script"
[ -z "$NOCOMMIT" ] && apk del -q $*
eecho "warning: pkg_deinst is deprecated. Use 'apk del --quiet' in script"
[ -z "$NOCOMMIT" ] && apk del --quiet $*
}
default_read() {
......
......@@ -154,8 +154,8 @@ done
# main
# install alpine-mirrors if its not already there
to_uninstall=
if ! apk info -q -e alpine-mirrors; then
apk add -q alpine-mirrors
if ! apk info --quiet --installed alpine-mirrors; then
apk add --quiet alpine-mirrors
to_uninstall=alpine-mirrors
fi
......@@ -199,10 +199,10 @@ done
if [ -n "$changed" ]; then
echo -n "Updating repository indexes... "
apk update -q && echo "done."
apk update --quiet && echo "done."
fi
# clean up
if [ -n "$to_uninstall" ]; then
apk del -q alpine-mirrors
apk del --quiet alpine-mirrors
fi
......@@ -7,7 +7,7 @@ cleanup() {
local i=
cd /
if [ -n "$uninstalls" ]; then
apk del -q syslinux
apk del --quiet syslinux
fi
sync
sleep 1
......@@ -274,7 +274,7 @@ fi
echo "Making $dest bootable..."
if ! [ -x "$(which syslinux)" ]; then
apk add -q syslinux || die "Failed to install syslinux"
apk add --quiet syslinux || die "Failed to install syslinux"
uninstalls="syslinux"
fi
......
......@@ -110,7 +110,7 @@ unpack_apkovl() {
return 0
fi
apk add -q openssl
apk add --quiet openssl
if ! openssl list-cipher-commands | grep "^$suffix$" > /dev/null; then
errstr="Cipher $suffix is not supported"
......@@ -387,7 +387,7 @@ stop_all_raid() {
init_progs() {
local raidpkg=
[ -n "$USE_RAID" ] && raidpkg="mdadm"
apk add -q sfdisk e2fsprogs lvm2 $raidpkg syslinux $@
apk add --quiet sfdisk e2fsprogs lvm2 $raidpkg syslinux $@
}
show_disk_info() {
......@@ -875,7 +875,7 @@ shift $(( $OPTIND - 1))
if [ -d "$1" ]; then
# install to given mounted root
apk add -q syslinux
apk add --quiet syslinux
install_mounted_root "${1%/}" \
&& echo "You might need fix the MBR to be able to boot" >&2
exit $?
......
......@@ -468,7 +468,7 @@ prompt_for_interfaces() {
fi
if [ -n "$PKGS" ]; then
apk add -q $PKGS
apk add --quiet $PKGS
fi
mkdir -p $ROOT/etc/network
......
......@@ -73,15 +73,15 @@ select_variant() {
goodbye() {
if [ $was_installed -ne 0 ]; then
apk del -q bkeymaps
apk del --quiet bkeymaps
fi
exit $1
}
apk info -eq bkeymaps
apk info --quiet --installed bkeymaps
was_installed=$?
apk add -q bkeymaps
apk add --quiet bkeymaps
deflayout="$1"
defvariant="$2"
......
......@@ -46,7 +46,7 @@ openntpd)
;;
esac
apk add -q $pkgs
apk add --quiet $pkgs
rc-update add $svc default
rc-service $svc start
......@@ -51,8 +51,8 @@ while getopts "hp:z:" opt; do
esac
done
if ! apk info -q -e tzdata; then
apk add -q tzdata && apkdel="tzdata" || exit 1
if ! apk info --quiet --installed tzdata; then
apk add --quiet tzdata && apkdel="tzdata" || exit 1
fi
zonepath=$(cat /etc/TZ 2>/dev/null)
......@@ -105,6 +105,6 @@ while true; do
done
if [ -n "$apkdel" ]; then
apk del -q $apkdel
apk del --quiet $apkdel
fi
......@@ -10,7 +10,7 @@ for mod in xen_netback xen_blkback xenfs xen_pciback xen_wdt tun; do
done
# install packages
apk add -q xen
apk add --quiet xen
# setup and start services
for svc in xenstored xenconsoled xenqemu; do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment