Slax Linux - Быстрый, компактный и надёжный linux дистрибутив.
Операционная система Slax => Вопросы и ответы по системе => Тема начата: ter123 от 14 Август 2017, 11:44:54
-
слепил скрипт типа
#!/bin/bash
read -p " Y|y - if you want to change iptables " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
exit
fi
## iptables
iptables -F
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT --fragment -p ICMP -j DROP
iptables -A OUTPUT -o lo -j ACCEPT
## ip6tables
ip6tables -F
ip6tables -P INPUT DROP
ip6tables -P FORWARD DROP
ip6tables -P OUTPUT DROP
##
read -p " Y|y - if you want to change ./bashrc " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
exit
fi
cat /home/mybashrc >> /root/.bashrc
read -p " Y|y - if you want to change settings konsole " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
exit
fi
cp -avf /home/Shell.profile /root/.kde/share/apps/konsole/
cp -avf /home/kdebugrc /root/.kde/share/config/
read -p " Y|y - if you want to change connections" -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
exit
fi
rm /etc/NetworkManager/system-connections/*
cp -avf /home/Utel /etc/NetworkManager/system-connections/
cp -avf "/home/kyivstar - Internet 3G" /etc/NetworkManager/system-connections/
нужно чтобы он сразу запускался после загрузки iso
?