first commit

This commit is contained in:
iProbe 2022-10-18 16:59:37 +08:00
commit ba848e218d
1001 changed files with 152333 additions and 0 deletions

View file

@ -0,0 +1,39 @@
#!/bin/bash
## 更新或安装软件
# yum install/update -y [software]
if [ $# -eq 0 ];then
echo -e "\033[31;1mUSGE:$0 [software]\033[0m"
exit 1
else
# chattr -i
chattr -i /usr/bin
chattr -i /usr/sbin
chattr -i /usr/local/sbin
chattr -i /usr/local/bin
chattr -i /usr/libexec
chattr -i /sbin/
chattr -i /bin/
chattr -i /etc/yum.repos.d/
while [ $# -gt 0 ];do
soft=`/usr/bin/yum list $1 | grep Error`
if [ -n $soft ];then
/usr/bin/yum install -y $1
else
/usr/bin/yum update -y $1
fi
shift
done
# chattr +i
chattr +i /usr/bin
chattr +i /usr/sbin
chattr +i /usr/local/sbin
chattr +i /usr/local/bin
chattr +i /usr/libexec
chattr +i /sbin/
chattr +i /bin/
chattr +i /etc/yum.repos.d/
fi