Commit 9332467d authored by Vitaly Lipatov's avatar Vitaly Lipatov

update scripts

parent a3b88c84
...@@ -62,7 +62,7 @@ fi ...@@ -62,7 +62,7 @@ fi
echo "Use REALM $REALM ..." echo "Use REALM $REALM ..."
if grep -q "include /etc/krb5.conf.d" /etc/krb5.conf ; then if grep -q "include /etc/krb5.conf.d" /etc/krb5.conf || grep -q "includedir /etc/krb5.conf.d" /etc/krb5.conf ; then
mkdir -p /etc/krb5.conf.d/ mkdir -p /etc/krb5.conf.d/
cat <<EOF >/etc/krb5.conf.d/ad cat <<EOF >/etc/krb5.conf.d/ad
[libdefaults] [libdefaults]
......
#!/bin/sh
TO=/tmp/altgit
rsync -av --progress --fuzzy --delete-after rsync://git.altlinux.org/gears/ $TO/gears/
rsync -av --progress --fuzzy --delete-after rsync://git.altlinux.org/srpms/ $TO/srpms/
DB_USER=eter_jabber
DB_PASS=uH7ZDfNzaHbHvcCY
DB_HOST=91.232.225.23
DB=eter_jabber
REALM=im.etersoft.ru
FROMEMAIL=lav@etersoft.ru
...@@ -54,8 +54,13 @@ control sudo wheelonly ...@@ -54,8 +54,13 @@ control sudo wheelonly
if ! grep "/home" /etc/fstab | grep -q nfs ; then if ! grep "/home" /etc/fstab | grep -q nfs ; then
cat <<EOF >>/etc/fstab cat <<EOF >>/etc/fstab
server:/home /home nfs rw,_netdev 0 0 homeserver:/home /home nfs rw,intr,sec=sys,_netdev 0 0
windsor:/srv /srv nfs rw,soft,intr,timeo=50,_netdev 0 0 srvserver:/srv /srv nfs rw,intr,sec=sys,_netdev 0 0
ftpserver:/tmp /var/ftp/tmp nfs rw,bg,soft,_netdev 0 0
ftpserver:/pvt /var/ftp/pvt nfs rw,bg,soft,_netdev 0 0
ftpserver:/pub /var/ftp/pub nfs rw,bg,soft,_netdev 0 0
EOF EOF
fi fi
...@@ -113,19 +118,21 @@ serv chronyd on ...@@ -113,19 +118,21 @@ serv chronyd on
# add start range for the local users # add start range for the local users
useradd uidrange -u 2000 -U -M useradd uidrange -u 2000 -U -M
epmi systemd-settings-disable-dumpcore systemd-settings-enable-log-to-tty12 systemd-settings-enable-showstatus || fatal epmi systemd-settings-disable-dumpcore
epmi systemd-settings-enable-log-to-tty12 systemd-settings-enable-showstatus || fatal
epmi --skip-installed cups cups-browsed
serv cups on serv cups on
serv cups-browsed on serv cups-browsed on
#if [ ! -f /etc/chromium/policies/recommended/etersoft-kerberos.json ] ; then if [ -d /etc/chromium/policies/recommended/ ] ; then
cat <<EOF >/etc/chromium/policies/recommended/etersoft-kerberos.json cat <<EOF >/etc/chromium/policies/recommended/etersoft-kerberos.json
{ {
"AuthServerAllowlist": "*.etersoft.ru,*.eterhost.ru", "AuthServerAllowlist": "*.etersoft.ru,*.eterhost.ru",
"AuthNegotiateDelegateAllowlist": "*.etersoft.ru,*.eterhost.ru" "AuthNegotiateDelegateAllowlist": "*.etersoft.ru,*.eterhost.ru"
} }
EOF EOF
#fi fi
if [ -f /etc/net/ifaces/e*/options ] ; then if [ -f /etc/net/ifaces/e*/options ] ; then
subst "s|^NM_CONTROLLED=yes|NM_CONTROLLED=no|" /etc/net/ifaces/e*/options subst "s|^NM_CONTROLLED=yes|NM_CONTROLLED=no|" /etc/net/ifaces/e*/options
......
...@@ -96,7 +96,7 @@ print_part_type() ...@@ -96,7 +96,7 @@ print_part_type()
echo >$0.log echo >$0.log
# FIXME: prepare some unused cache: # FIXME: prepare some unused cache:
for i in /dev/sd? /dev/nvme0n? ; do for i in /dev/sd? /dev/nvme?n? ; do
[ -n "$VERBOSE" ] && echo [ -n "$VERBOSE" ] && echo
#[ -n "$VERBOSE" ] && hdparm -i $i | grep -B2 SerialNo | grep -v "^$" #[ -n "$VERBOSE" ] && hdparm -i $i | grep -B2 SerialNo | grep -v "^$"
#SERNO=$(hdparm -i $i | grep SerialNo | sed -e "s/.*SerialNo=//g" | tail -c 5) #SERNO=$(hdparm -i $i | grep SerialNo | sed -e "s/.*SerialNo=//g" | tail -c 5)
......
...@@ -2,18 +2,18 @@ ...@@ -2,18 +2,18 @@
#exec &>./doeverywhere.log #exec &>./doeverywhere.log
HOSTS="devel windsor cellar priv host03 fund clients de01 azbykar telros a01 a02" HOSTS="devel windsor cellar priv host03 fund clients de01 azbykar telros"
for i in $HOSTS for i in $HOSTS
do do
VZLIST=$(ssh $i ' vzlist|tr -s " "|cut -f2 -d" "|grep -v CTID ') VZLIST=$(ssh $i ' vzlist -1 ')
for j in $VZLIST for j in $VZLIST
do do
#echo echo
#echo $i '-' $j ':' echo $i '-' $j ':'
#echo echo
###ssh $i vzctl exec $j <<<place the command here (with spaces without quotes)>>> ###ssh $i vzctl exec $j <<<place the command here (with spaces without quotes)>>>
#ssh $i vzctl exec $j epmI -y openssl openssh-server #ssh $i vzctl exec $j epmI -y openssl openssh-server
...@@ -24,7 +24,9 @@ do ...@@ -24,7 +24,9 @@ do
#ssh $i vzctl exec $j rpm -q openssh-server #ssh $i vzctl exec $j rpm -q openssh-server
#ssh $i vzctl exec $j cat /etc/redhat-release #ssh $i vzctl exec $j cat /etc/redhat-release
[ x$(ssh $i vzctl exec $j distr_info 2>/dev/null ) = x'ALTLinux/Sisyphus' ] && echo $i '-' $j ':' #[ x$(ssh $i vzctl exec $j distr_info 2>/dev/null ) = x'ALTLinux/Sisyphus' ] && echo $i '-' $j ':'
[ ! x$(ssh $i vzctl exec $j rpm -q apache2|grep '2\.4\.') = x ] && echo -n "$i $j" >> /var/log/apache2_update.log && ssh $i vzlist|grep " $j "|cut -f2- -d'g' >> /var/log/apache2_update.log
done done
done done
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