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