forked from arcolinuxd/arco-xfce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path150-install-network-discovery-v4.sh
executable file
·42 lines (36 loc) · 1.66 KB
/
150-install-network-discovery-v4.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
set -e
##################################################################################################################
# Author : Erik Dubois
# Website : https://www.erikdubois.be
# Website : https://www.arcolinux.info
# Website : https://www.arcolinux.com
# Website : https://www.arcolinuxd.com
# Website : https://www.arcolinuxb.com
# Website : https://www.arcolinuxiso.com
# Website : https://www.arcolinuxforum.com
##################################################################################################################
#
# DO NOT JUST RUN THIS. EXAMINE AND JUDGE. RUN AT YOUR OWN RISK.
#
##################################################################################################################
echo "Network Discovery"
sudo pacman -S --noconfirm --needed avahi
sudo systemctl enable avahi-daemon.service
sudo systemctl start avahi-daemon.service
#shares on a mac
sudo pacman -S --noconfirm --needed nss-mdns
#shares on a linux
sudo pacman -S --noconfirm --needed gvfs-smb
#change nsswitch.conf for access to nas servers
#original line comes from the package filesystem
#hosts: files mymachines myhostname resolve [!UNAVAIL=return] dns
#ArcoLinux line
#hosts: files mymachines resolve [!UNAVAIL=return] mdns dns wins myhostname
#first part
sudo sed -i 's/files mymachines myhostname/files mymachines/g' /etc/nsswitch.conf
#last part
sudo sed -i 's/\[\!UNAVAIL=return\] dns/\[\!UNAVAIL=return\] mdns dns wins myhostname/g' /etc/nsswitch.conf
echo "################################################################"
echo "#### network discovery software installed ########"
echo "################################################################"