removed sudo from install.sh
This commit is contained in:
@@ -13,3 +13,5 @@ plug an ethernet cable with internet access on the pi
|
|||||||
boot the pi and connect with ssh (use nmap to find the pi ip)
|
boot the pi and connect with ssh (use nmap to find the pi ip)
|
||||||
|
|
||||||
install git ```pacman -S git```
|
install git ```pacman -S git```
|
||||||
|
|
||||||
|
run install.sh as root
|
||||||
|
|||||||
+33
-33
@@ -9,32 +9,32 @@ function install(){
|
|||||||
|
|
||||||
# candy
|
# candy
|
||||||
echo 'ILoveCandy (pacman)'
|
echo 'ILoveCandy (pacman)'
|
||||||
sudo sed -i.back 's/.*\[options\].*/&\nILoveCandy/' /etc/pacman.conf
|
sed -i.back 's/.*\[options\].*/&\nILoveCandy/' /etc/pacman.conf
|
||||||
sudo sed -i.back 's/^#Color$/Color/' /etc/pacman.conf
|
sed -i.back 's/^#Color$/Color/' /etc/pacman.conf
|
||||||
sudo sed -i.back 's/^#TotalDownload$/TotalDownload/' /etc/pacman.conf
|
sed -i.back 's/^#TotalDownload$/TotalDownload/' /etc/pacman.conf
|
||||||
|
|
||||||
# update systeme
|
# update systeme
|
||||||
sudo pacman -Syyu
|
pacman -Syyu
|
||||||
# install basic packages
|
# install basic packages
|
||||||
sudo pacman -S --needed --noconfirm vim rsync wget tmux
|
pacman -S --needed --noconfirm vim rsync wget tmux
|
||||||
|
|
||||||
# configure vim
|
# configure vim
|
||||||
echo 'vim configuration'
|
echo 'vim configuration'
|
||||||
sudo pacman -S --needed --noconfirm vim-{spell-fr,spell-en,nerdtree,supertab,systemd}
|
pacman -S --needed --noconfirm vim-{spell-fr,spell-en,nerdtree,supertab,systemd}
|
||||||
cp -r $_cwp/assets/vim /home/$USER/.vim
|
cp -r $_cwp/assets/vim /home/$USER/.vim
|
||||||
cp $_cwd/assets/vimrc /home/$USER/.vimrc
|
cp $_cwd/assets/vimrc /home/$USER/.vimrc
|
||||||
sudo cp -r $_cwd/assets/vim /root/.vim
|
cp -r $_cwd/assets/vim /root/.vim
|
||||||
sudo cp $_cwd/assets/vimrc /root/.vimrc
|
cp $_cwd/assets/vimrc /root/.vimrc
|
||||||
|
|
||||||
# configure git
|
# configure git
|
||||||
echo 'Git Completion'
|
echo 'Git Completion'
|
||||||
sudo pacman -S --needed --noconfirm bash-completion
|
pacman -S --needed --noconfirm bash-completion
|
||||||
sudo mkdir /etc/bash_completion.d
|
mkdir /etc/bash_completion.d
|
||||||
sudo wget -O /etc/bash_completion.d/git-completion.bash https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash
|
wget -O /etc/bash_completion.d/git-completion.bash https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash
|
||||||
|
|
||||||
# yaourt
|
# yaourt
|
||||||
# only needed for pynmea2 and python-picamera
|
# only needed for pynmea2 and python-picamera
|
||||||
# sudo pacman -S --needed --noconfirm base-devel
|
# pacman -S --needed --noconfirm base-devel
|
||||||
# mkdir -p /home/$USER/build-repos
|
# mkdir -p /home/$USER/build-repos
|
||||||
# wget -O /home/$USER/build-repos/package-query.tar.gz https://aur.archlinux.org/cgit/aur.git/snapshot/package-query.tar.gz
|
# wget -O /home/$USER/build-repos/package-query.tar.gz https://aur.archlinux.org/cgit/aur.git/snapshot/package-query.tar.gz
|
||||||
# wget -O /home/$USER/build-repos/yaourt.tar.gz https://aur.archlinux.org/cgit/aur.git/snapshot/yaourt.tar.gz
|
# wget -O /home/$USER/build-repos/yaourt.tar.gz https://aur.archlinux.org/cgit/aur.git/snapshot/yaourt.tar.gz
|
||||||
@@ -60,21 +60,21 @@ function install(){
|
|||||||
|
|
||||||
# hostname
|
# hostname
|
||||||
echo 'set hostname'
|
echo 'set hostname'
|
||||||
sudo hostnamectl set-hostname pi-hotspot-4G
|
hostnamectl set-hostname pi-hotspot-4G
|
||||||
sudo sed -i 's/localhost$/&\tpi-hotspot-4G/' /etc/hosts
|
sed -i 's/localhost$/&\tpi-hotspot-4G/' /etc/hosts
|
||||||
sudo sed -i 's/^hostname$/&\tpi-hotspot-4G/' /etc/dhcpcd.conf
|
sed -i 's/^hostname$/&\tpi-hotspot-4G/' /etc/dhcpcd.conf
|
||||||
|
|
||||||
|
|
||||||
# avahi
|
# avahi
|
||||||
# echo "install avahi"
|
# echo "install avahi"
|
||||||
# sudo pacman -S --needed --noconfirm avahi nss-mdns
|
# pacman -S --needed --noconfirm avahi nss-mdns
|
||||||
# echo "configure avahi"
|
# echo "configure avahi"
|
||||||
# sudo systemctl enable avahi-daemon
|
# systemctl enable avahi-daemon
|
||||||
# sudo systemctl start avahi-deamon
|
# systemctl start avahi-deamon
|
||||||
# sudo sed -i 's/hosts: files dns myhostname/hosts: files mdns_minimal [NOTFOUND=return] dns hehe-rail-rover/' /etc/nsswitch.conf
|
# sed -i 's/hosts: files dns myhostname/hosts: files mdns_minimal [NOTFOUND=return] dns hehe-rail-rover/' /etc/nsswitch.conf
|
||||||
|
|
||||||
# disable bluetooth
|
# disable bluetooth
|
||||||
sudo cp $_cwd/assets/rpi-wifi-blacklist.conf /ect/modprod.d/
|
cp $_cwd/assets/rpi-wifi-blacklist.conf /ect/modprod.d/
|
||||||
|
|
||||||
|
|
||||||
# gsm
|
# gsm
|
||||||
@@ -84,9 +84,9 @@ function install(){
|
|||||||
echo 'install gsm 3G tools'
|
echo 'install gsm 3G tools'
|
||||||
|
|
||||||
# HUAWEI E3372
|
# HUAWEI E3372
|
||||||
sudo sh -c 'echo "max_usb_current=1" >> /boot/config.txt'
|
sh -c 'echo "max_usb_current=1" >> /boot/config.txt'
|
||||||
|
|
||||||
sudo pacman -S --needed --noconfirm usb_modeswitch ifplugd
|
pacman -S --needed --noconfirm usb_modeswitch ifplugd
|
||||||
# before : Bus 001 Device 004: ID 12d1:1f01 Huawei Technologies Co., Ltd. E353/E3131 (Mass storage mode)
|
# before : Bus 001 Device 004: ID 12d1:1f01 Huawei Technologies Co., Ltd. E353/E3131 (Mass storage mode)
|
||||||
# after Bus 001 Device 006: ID 12d1:14dc Huawei Technologies Co., Ltd.
|
# after Bus 001 Device 006: ID 12d1:14dc Huawei Technologies Co., Ltd.
|
||||||
# eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
|
# eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
|
||||||
@@ -94,20 +94,20 @@ function install(){
|
|||||||
|
|
||||||
# LTE HUAWEI
|
# LTE HUAWEI
|
||||||
echo "copy lte huawei netctl profile"
|
echo "copy lte huawei netctl profile"
|
||||||
sudo cp $_cwd/assets/netctl/huawei /etc/netctl/
|
cp $_cwd/assets/netctl/huawei /etc/netctl/
|
||||||
sudo cp $_cwd/assets/netctl/synchook /etc/netctl/hooks/
|
cp $_cwd/assets/netctl/synchook /etc/netctl/hooks/
|
||||||
echo "enable and start auto lte connection service"
|
echo "enable and start auto lte connection service"
|
||||||
sudo cp $_cwd/assets/services/lteconnect.service /etc/systemd/system/
|
cp $_cwd/assets/services/lteconnect.service /etc/systemd/system/
|
||||||
sudo systemctl enable lteconnect.service
|
systemctl enable lteconnect.service
|
||||||
|
|
||||||
# HOTSPOT WIFI
|
# HOTSPOT WIFI
|
||||||
echo "enable and start hotspot wifi netctl profile"
|
echo "enable and start hotspot wifi netctl profile"
|
||||||
sudo cp $_cwd/assets/netctl/wifihotspot /etc/netctl/
|
cp $_cwd/assets/netctl/wifihotspot /etc/netctl/
|
||||||
sudo netctl enable wifihotspot
|
netctl enable wifihotspot
|
||||||
sudo netctl start wifihotspot
|
netctl start wifihotspot
|
||||||
echo "enable and start auto kill wifi service"
|
echo "enable and start auto kill wifi service"
|
||||||
sudo cp $_cwd/assets/services/autokillwifi.service /etc/systemd/system/
|
cp $_cwd/assets/services/autokillwifi.service /etc/systemd/system/
|
||||||
sudo systemctl enable autokillwifi.service
|
systemctl enable autokillwifi.service
|
||||||
|
|
||||||
|
|
||||||
# dyndns
|
# dyndns
|
||||||
@@ -118,8 +118,8 @@ function install(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sudo timedatectl set-ntp true
|
timedatectl set-ntp true
|
||||||
sudo timedatectl set-timezone Europe/Paris
|
timedatectl set-timezone Europe/Paris
|
||||||
|
|
||||||
# use tee to record all the install script output on logfile while keeping it on console
|
# use tee to record all the install script output on logfile while keeping it on console
|
||||||
# http://www.coderanch.com/t/419711/Linux-UNIX/capture-shell-scripts-ouput-log
|
# http://www.coderanch.com/t/419711/Linux-UNIX/capture-shell-scripts-ouput-log
|
||||||
|
|||||||
Reference in New Issue
Block a user