summaryrefslogtreecommitdiff
path: root/configs/releng-openrc/airootfs/etc/NetworkManager/dispatcher.d/reflector
blob: 728752062702a9cac694d1fcf88d4ac3c09271ed (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash
#
# SPDX-License-Identifier: GPL-3.0-or-later

if [ "$2" == up ] && ! grep -qoP 'mirror=\K\S+' /proc/cmdline; then
  reflector \
    --save /etc/pacman.d/mirrorlist \
    --protocol https \
    --latest 20 \
    --sort rate
fi