Commit 17393797 authored by Vitaly Lipatov's avatar Vitaly Lipatov

add tune_new_system.sh

parent 02f115b3
#!/bin/sh
echo -n "Checking for epm ... "
if ! which epm ; then
cat /etc/apt/sources.list.d/alt.list | sed -e "s|http://ftp.altlinux.org/pub/distributions|http://download.etersoft.ru/pub|" > /etc/apt/sources.list.d/etersoft.list
subst "s|^rpm|# rpm|" /etc/apt/sources.list.d/alt.list
apt-get update
apt-get install eepm || exit
echo OK
fi
if [ ! -d /etc/.git ] ; then
cd /etc
epmi etckeeper
etckeeper init
etckeeper commit "initial commit"
fi
if ! grep -q "root@server.office.etersoft.ru" /root/.ssh/authorized_keys ; then
echo "Set ssh key ..."
cat <<EOF >>/root/.ssh/authorized_keys
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKpX0yMvZS1r4mfEaeN4rjMlPPbtV3vdsLvV++wcajyx root@server.office.etersoft.ru
EOF
fi
epm -q avahi-daemon >/dev/null && epm remove avahi-daemon
control sudo public
if ! grep "/home" /etc/fstab | grep -q nfs ; then
cat <<EOF >>/etc/fstab
server:/home /home nfs rw,_netdev 0 0
windsor:/srv /srv nfs rw,soft,intr,timeo=50,_netdev 0 0
EOF
fi
if ! epm rl | grep -q "LINUX@Etersoft" ; then
epm ar etersoft
epm update
fi
# etersoft-desktop-essential-office
#/srv/lav/Projects/git-eter/etersoft-admin-essential/dc-client/tune_sssd.sh lavadmin
if ! grep -q ^eterworkers /etc/role ; then
cat <<EOF >>/etc/role
eterworkers: wheel,audio,uucp,cdrom,floppy,cdwriter,radio,video,camera,scanner,fuse
EOF
fi
# TODO
subst "s|# WHEEL_USERS ALL=(ALL) NOPASSWD: ALL|WHEEL_USERS ALL=(ALL) NOPASSWD: ALL|" /etc/sudoers
userdel user
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