update
This commit is contained in:
1 parent
b5130f7c82
commit
a24a499710
4 files changed
+44
-17
No files matched your search
@@ -18,26 +18,31 @@ choose_sites(){
|
|||||||
MIRROR_URL=https://mirrors.ustc.edu.cn/debian/
|
MIRROR_URL=https://mirrors.ustc.edu.cn/debian/
|
||||||
SEC_URL=https://mirrors.ustc.edu.cn/debian-security
|
SEC_URL=https://mirrors.ustc.edu.cn/debian-security
|
||||||
DOCKER_URL=https://mirrors.ustc.edu.cn/docker-ce/linux/debian
|
DOCKER_URL=https://mirrors.ustc.edu.cn/docker-ce/linux/debian
|
||||||
|
PVE_URL=https://mirrors.ustc.edu.cn/proxmox/debian/pve
|
||||||
;;
|
;;
|
||||||
2)
|
2)
|
||||||
MIRROR_URL=https://mirrors.xjtu.edu.cn/debian/
|
MIRROR_URL=https://mirrors.xjtu.edu.cn/debian/
|
||||||
SEC_URL=https://mirrors.xjtu.edu.cn/debian-security
|
SEC_URL=https://mirrors.xjtu.edu.cn/debian-security
|
||||||
DOCKER_URL=https://mirrors.xjtu.edu.cn/docker-ce/linux/debian
|
DOCKER_URL=https://mirrors.xjtu.edu.cn/docker-ce/linux/debian
|
||||||
|
PVE_URL=https://mirrors.ustc.edu.cn/proxmox/debian/pve
|
||||||
;;
|
;;
|
||||||
3)
|
3)
|
||||||
MIRROR_URL=https://mirrors.nju.edu.cn/debian/
|
MIRROR_URL=https://mirrors.nju.edu.cn/debian/
|
||||||
SEC_URL=https://mirrors.nju.edu.cn/debian-security
|
SEC_URL=https://mirrors.nju.edu.cn/debian-security
|
||||||
DOCKER_URL=https://mirrors.nju.edu.cn/docker-ce/linux/debian
|
DOCKER_URL=https://mirrors.nju.edu.cn/docker-ce/linux/debian
|
||||||
|
PVE_URL=https://mirrors.nju.edu.cn/proxmox/debian/pve
|
||||||
;;
|
;;
|
||||||
4)
|
4)
|
||||||
MIRROR_URL=https://mirrors.tuna.tsinghua.edu.cn/debian/
|
MIRROR_URL=https://mirrors.tuna.tsinghua.edu.cn/debian/
|
||||||
SEC_URL=https://mirrors.tuna.tsinghua.edu.cn/debian-security
|
SEC_URL=https://mirrors.tuna.tsinghua.edu.cn/debian-security
|
||||||
DOCKER_URL=https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian
|
DOCKER_URL=https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian
|
||||||
|
PVE_URL=https://mirrors.tuna.tsinghua.edu.cn/proxmox/debian/pve
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
MIRROR_URL=https://deb.debian.org/debian/
|
MIRROR_URL=https://deb.debian.org/debian/
|
||||||
SEC_URL=https://security.debian.org/debian-security
|
SEC_URL=https://security.debian.org/debian-security
|
||||||
DOCKER_URL=https://download.docker.com/linux/debian
|
DOCKER_URL=https://download.docker.com/linux/debian
|
||||||
|
PVE_URL=http://download.proxmox.com/debian/pve
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
@@ -62,6 +67,11 @@ deb $MIRROR_URL $OS_CODE-backports main contrib non-free non-free-firmware
|
|||||||
deb $SEC_URL $OS_CODE-security main contrib non-free non-free-firmware
|
deb $SEC_URL $OS_CODE-security main contrib non-free non-free-firmware
|
||||||
" | tee /etc/apt/sources.list
|
" | tee /etc/apt/sources.list
|
||||||
|
|
||||||
|
if [ $FOR_PVE -eq 1 ]; then
|
||||||
|
echo "deb $PVE_URL bookworm pve-no-subscription" | \
|
||||||
|
tee /etc/apt/sources.list.d/pve-no-subscription.list
|
||||||
|
fi
|
||||||
|
|
||||||
command="nala"
|
command="nala"
|
||||||
apt update
|
apt update
|
||||||
apt install $command || command="apt"
|
apt install $command || command="apt"
|
||||||
@@ -77,26 +87,31 @@ deb $SEC_URL $OS_CODE-security main contrib non-free non-free-firmware
|
|||||||
gpg --dearmor | tee /etc/apt/trusted.gpg.d/shells_zsh-users_zsh-completions.gpg > /dev/null
|
gpg --dearmor | tee /etc/apt/trusted.gpg.d/shells_zsh-users_zsh-completions.gpg > /dev/null
|
||||||
|
|
||||||
|
|
||||||
echo "deb [arch=$OS_ARCH] $DOCKER_URL $OS_CODE stable" | \
|
|
||||||
tee /etc/apt/sources.list.d/docker.list
|
|
||||||
curl -fsSL "https://download.docker.com/linux/debian/gpg" | \
|
|
||||||
gpg --dearmor | tee /etc/apt/trusted.gpg.d/docker.gpg > /dev/null
|
|
||||||
|
|
||||||
|
|
||||||
echo "deb https://packagecloud.io/ookla/speedtest-cli/debian/ $OS_CODE main" | \
|
echo "deb https://packagecloud.io/ookla/speedtest-cli/debian/ $OS_CODE main" | \
|
||||||
tee /etc/apt/sources.list.d/ookla_speedtest-cli.list
|
tee /etc/apt/sources.list.d/ookla_speedtest-cli.list
|
||||||
curl -fsSL "https://packagecloud.io/ookla/speedtest-cli/gpgkey" | \
|
curl -fsSL "https://packagecloud.io/ookla/speedtest-cli/gpgkey" | \
|
||||||
gpg --dearmor | tee /etc/apt/trusted.gpg.d/ookla_speedtest-cli-archive-keyring.gpg > /dev/null
|
gpg --dearmor | tee /etc/apt/trusted.gpg.d/ookla_speedtest-cli-archive-keyring.gpg > /dev/null
|
||||||
|
|
||||||
echo "deb [arch=$OS_ARCH] http://packages.azlux.fr/debian $OS_CODE main" | \
|
|
||||||
tee /etc/apt/sources.list.d/azlux.list
|
if [ $FOR_PVE -eq 0 ]; then
|
||||||
curl -fsSL "https://azlux.fr/repo.gpg.key" | \
|
echo "deb [arch=$OS_ARCH] $DOCKER_URL $OS_CODE stable" | \
|
||||||
gpg --dearmor | tee /etc/apt/trusted.gpg.d/azlux-archive-keyring.gpg > /dev/null
|
tee /etc/apt/sources.list.d/docker.list
|
||||||
|
curl -fsSL "https://download.docker.com/linux/debian/gpg" | \
|
||||||
|
gpg --dearmor | tee /etc/apt/trusted.gpg.d/docker.gpg > /dev/null
|
||||||
|
|
||||||
|
echo "deb [arch=$OS_ARCH] http://packages.azlux.fr/debian $OS_CODE main" | \
|
||||||
|
tee /etc/apt/sources.list.d/azlux.list
|
||||||
|
curl -fsSL "https://azlux.fr/repo.gpg.key" | \
|
||||||
|
gpg --dearmor | tee /etc/apt/trusted.gpg.d/azlux-archive-keyring.gpg > /dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
usermod -s /usr/bin/zsh $(whoami)
|
usermod -s /usr/bin/zsh $(whoami)
|
||||||
cp "$SCRIPTPATH/.zshrc" $HOME
|
cp "$SCRIPTPATH/.zshrc" $HOME
|
||||||
cp "$SCRIPTPATH/.screenrc" $HOME
|
cp "$SCRIPTPATH/.screenrc" $HOME
|
||||||
cp $SCRIPTPATH/*.py $HOME
|
cp $SCRIPTPATH/*.py $HOME
|
||||||
|
if [ $FOR_PVE -eq 1 ]; then
|
||||||
|
cp "$SCRIPTPATH/iommu.sh" $HOME
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
install_pkg(){
|
install_pkg(){
|
||||||
@@ -112,6 +127,7 @@ usage(){
|
|||||||
echo "OPTIONS:";
|
echo "OPTIONS:";
|
||||||
echo " -f <PACKAGES> package list file (default: $PKG_BASE)";
|
echo " -f <PACKAGES> package list file (default: $PKG_BASE)";
|
||||||
echo " -i install only";
|
echo " -i install only";
|
||||||
|
echo " -p pve";
|
||||||
echo " -m <CHOICE> apt mirror source";
|
echo " -m <CHOICE> apt mirror source";
|
||||||
echo " 1 ustc (default)"
|
echo " 1 ustc (default)"
|
||||||
echo " 2 xjtu"
|
echo " 2 xjtu"
|
||||||
@@ -122,8 +138,9 @@ usage(){
|
|||||||
|
|
||||||
PKG_BASE="$SCRIPTPATH/packages-base"
|
PKG_BASE="$SCRIPTPATH/packages-base"
|
||||||
INSTALL_ONLY=0;
|
INSTALL_ONLY=0;
|
||||||
|
FOR_PVE=0;
|
||||||
MIRROR_SOURCE=1;
|
MIRROR_SOURCE=1;
|
||||||
while getopts ":f:im:" OPT; do
|
while getopts ":f:ipm:" OPT; do
|
||||||
case $OPT in
|
case $OPT in
|
||||||
f)
|
f)
|
||||||
PKG_BASE=$OPTARG;
|
PKG_BASE=$OPTARG;
|
||||||
@@ -131,6 +148,9 @@ while getopts ":f:im:" OPT; do
|
|||||||
i)
|
i)
|
||||||
INSTALL_ONLY=1;
|
INSTALL_ONLY=1;
|
||||||
;;
|
;;
|
||||||
|
p)
|
||||||
|
FOR_PVE=1;
|
||||||
|
;;
|
||||||
m)
|
m)
|
||||||
MIRROR_SOURCE=$OPTARG;
|
MIRROR_SOURCE=$OPTARG;
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
shopt -s nullglob
|
||||||
|
for d in /sys/kernel/iommu_groups/*/devices/*; do
|
||||||
|
n=${d#*/iommu_groups/*}; n=${n%%/*}
|
||||||
|
printf 'IOMMU Group %s ' "$n"
|
||||||
|
lspci -nns "${d##*/}"
|
||||||
|
done;
|
||||||
@@ -17,10 +17,4 @@ iperf3
|
|||||||
mosh
|
mosh
|
||||||
screen
|
screen
|
||||||
zsh-completions
|
zsh-completions
|
||||||
docker-ce
|
|
||||||
docker-ce-cli
|
|
||||||
containerd.io
|
|
||||||
docker-buildx-plugin
|
|
||||||
docker-compose-plugin
|
|
||||||
speedtest
|
speedtest
|
||||||
docker-ctop
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
docker-ce
|
||||||
|
docker-ce-cli
|
||||||
|
containerd.io
|
||||||
|
docker-buildx-plugin
|
||||||
|
docker-compose-plugin
|
||||||
|
docker-ctop
|
||||||
Reference in new issue
Block a user