OSDN Git Service

Initial commit
[rebornos/cnchi-gnome-mac-osdn.git] / airootfs / usr / bin / internet.sh
1 #  Copyright © 2016-2019 Reborn OS
2 #
3 #  This file is part of Reborn OS.
4 #
5 #  Reborn OS is free software; you can redistribute it and/or modify
6 #  it under the terms of the GNU General Public License as published by
7 #  the Free Software Foundation; either version 3 of the License, or
8 #  (at your option) any later version.
9 #
10 #  Reborn OS is distributed in the hope that it will be useful,
11 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
12 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 #  GNU General Public License for more details.
14 #
15 #  The following additional terms are in effect as per Section 7 of the license:
16 #
17 #  The preservation of all legal notices and author attributions in
18 #  the material or in the Appropriate Legal Notices displayed
19 #  by works containing it is required.
20 #
21 #  You should have received a copy of the GNU General Public License
22 #  along with Reborn OS; If not, see <http://www.gnu.org/licenses/>.
23
24 gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout '0' && gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout '0'
25 systemd-detect-virt
26 if [ "$?" != oracle ]; then
27 echo "Running in Virtualbox"
28 fi
29 #sed '54 c\
30 #> http://experiencing-reborn.weebly.com/welcome.html' /usr/share/cnchi/src/pages/slides.py
31 sudo pacman -Scc --noconfirm
32 sudo paccache -ruk0 
33 sudo paccache -rk 0
34 sudo paccache -r --keep 0
35 sudo rm -rf /install/var/cache/pacman/pkg/*
36 if (( $(fping google.com | grep -o "alive") == "alive" )); then
37         sudo rm -rf /etc/pacman.d/gnupg
38         sudo pacman -Syy
39         sudo pacman-key --init
40         sudo pacman-key --populate archlinux rebornos
41         sudo pacman-key --refresh-keys
42         sudo pacman -Syy
43         sudo reflector --verbose -p https --sort rate --save /etc/pacman.d/mirrorlist
44         sudo rm -f /var/lib/pacman/sync/*.db
45         sudo rm -f /var/lib/pacman/sync/*.files
46         sudo pacman -Syy
47         sudo pacman -Fy
48         sudo pacman -Syy
49         # if [ ! -z $(grep "eu" "etc/pacman.d/mirrorlist") ]; then 
50         # sudo cp /usr/bin/cnchi/pacman.conf /etc/
51         # sudo mv /usr/bin/cnchi/reborn-mirrorlist2 /etc/pacman.d/reborn-mirrorlist
52         # fi
53         echo "######################################################"
54         echo "#####################   DONE   #######################"
55         echo "######################################################"
56 else 
57         bash /usr/bin/internet.sh
58 fi