Line 1... |
Line 1... |
1 |
#!/bin/bash
|
1 |
#!/bin/bash
|
2 |
# $Id: alcasar-uninstall.sh 3272 2025-04-23 14:33:51Z rexy $
|
2 |
# $Id: alcasar-uninstall.sh 3285 2025-05-20 17:33:11Z rexy $
|
3 |
|
3 |
|
4 |
# alcasar-uninstall.sh
|
4 |
# alcasar-uninstall.sh
|
5 |
# by Franck BOUIJOUX, Pascal LEVANT and Richard REY
|
5 |
# by Franck BOUIJOUX, Pascal LEVANT and Richard REY
|
6 |
# This script is distributed under the Gnu General Public License (GPL)
|
6 |
# This script is distributed under the Gnu General Public License (GPL)
|
7 |
|
7 |
|
Line 360... |
Line 360... |
360 |
echo -n " *** 'debug' : end removing function '$func' *** "
|
360 |
echo -n " *** 'debug' : end removing function '$func' *** "
|
361 |
read a
|
361 |
read a
|
362 |
fi
|
362 |
fi
|
363 |
done
|
363 |
done
|
364 |
if [ $mode == "full" ]; then
|
364 |
if [ $mode == "full" ]; then
|
365 |
echo -en "\n- network(10) : "
|
365 |
echo -en "\n- network(11) : "
|
366 |
hostnamectl set-hostname localhost.lan
|
366 |
hostnamectl set-hostname localhost.lan
|
367 |
chmod a-x /etc/sysconfig/network-scripts/default-*
|
367 |
chmod a-x /etc/sysconfig/network-scripts/default-*
|
368 |
i=0
|
368 |
i=0
|
369 |
for nic in `ls /etc/sysconfig/network-scripts/default-*|cut -d'-' -f4`
|
369 |
for nic in `ls /etc/sysconfig/network-scripts/default-*|cut -d'-' -f4`
|
370 |
do
|
370 |
do
|
Line 374... |
Line 374... |
374 |
done
|
374 |
done
|
375 |
[ -e /etc/sysconfig/network.default ] && mv -f /etc/sysconfig/network.default /etc/sysconfig/network && echo -n "3, "
|
375 |
[ -e /etc/sysconfig/network.default ] && mv -f /etc/sysconfig/network.default /etc/sysconfig/network && echo -n "3, "
|
376 |
[ -e /etc/hosts.default ] && mv -f /etc/hosts.default /etc/hosts && echo -n "4, "
|
376 |
[ -e /etc/hosts.default ] && mv -f /etc/hosts.default /etc/hosts && echo -n "4, "
|
377 |
[ -e /etc/hosts.allow.default ] && mv -f /etc/hosts.allow.default /etc/hosts.allow && echo -n "5, "
|
377 |
[ -e /etc/hosts.allow.default ] && mv -f /etc/hosts.allow.default /etc/hosts.allow && echo -n "5, "
|
378 |
[ -e /etc/hosts.deny.default ] && mv -f /etc/hosts.deny.default /etc/hosts.deny && echo -n "6, "
|
378 |
[ -e /etc/hosts.deny.default ] && mv -f /etc/hosts.deny.default /etc/hosts.deny && echo -n "6, "
|
- |
|
379 |
[ -e /etc/resolv.conf.default ] && mv -f /etc/resolv.conf.default /etc/resolv.conf && echo -n "7, "
|
379 |
[ -e /etc/modprobe.preload.default ] && mv -f /etc/modprobe.preload.default /etc/modprobe.preload && echo -n "7, "
|
380 |
[ -e /etc/modprobe.preload.default ] && mv -f /etc/modprobe.preload.default /etc/modprobe.preload && echo -n "8, "
|
380 |
if [ -e /etc/systemd/system/alcasar-network.service ]; then
|
381 |
if [ -e /etc/systemd/system/alcasar-network.service ]; then
|
381 |
rm -f /etc/systemd/system/alcasar-network.service
|
382 |
rm -f /etc/systemd/system/alcasar-network.service
|
382 |
echo -n "8, "
|
383 |
echo -n "9, "
|
383 |
fi
|
384 |
fi
|
384 |
if [ -e /etc/systemd/system/iptables.service ]; then
|
385 |
if [ -e /etc/systemd/system/iptables.service ]; then
|
385 |
rm -f /etc/systemd/system/iptables.service
|
386 |
rm -f /etc/systemd/system/iptables.service
|
386 |
echo -n "9, "
|
387 |
echo -n "10, "
|
387 |
fi
|
388 |
fi
|
388 |
[ -e /usr/libexec/iptables.init.default ] && mv -f /usr/libexec/iptables.init.default /usr/libexec/iptables.init && echo -n "10"
|
389 |
[ -e /usr/libexec/iptables.init.default ] && mv -f /usr/libexec/iptables.init.default /usr/libexec/iptables.init && echo -n "11"
|
389 |
/usr/bin/systemctl restart network
|
390 |
/usr/bin/systemctl restart network
|
390 |
sleep 1
|
391 |
sleep 1
|
391 |
fi
|
392 |
fi
|
392 |
|
393 |
|
393 |
# Reset "skip.list" (we keep "kernel" in order not to download kernel we don't want to have)
|
394 |
# Reset "skip.list" (we keep "kernel" in order not to download kernel we don't want to have)
|