-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgetget_old
More file actions
executable file
·86 lines (74 loc) · 2.26 KB
/
getget_old
File metadata and controls
executable file
·86 lines (74 loc) · 2.26 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/bin/bash
## conf and install packs over base-system
## https://youtu.be/RuLSZkWwlC4
## https://github.com/quarkscript/batch-install-scripts
# write your own user name and host name if you want
user_name=linuser
host_name=ArchComp
# set localtime
rm -r /etc/localtime
ln -s /usr/share/zoneinfo/Europe/Kiev /etc/localtime
# set hostname
echo $host_name > /etc/hostname
# set locale
echo '# '>> /etc/locale.gen
echo '# Automatically added by installation script'>> /etc/locale.gen
echo 'en_US.UTF-8 UTF-8 '>> /etc/locale.gen
echo 'uk_UA.UTF-8 UTF-8 '>> /etc/locale.gen
echo 'ru_RU.UTF-8 UTF-8 '>> /etc/locale.gen
locale-gen
# set lang
echo '#LANG="en_US.UTF-8" ' > /etc/locale.conf
echo 'LANG="uk_UA.UTF-8" ' >> /etc/locale.conf
echo '#LANG="ru_RU.UTF-8" ' >> /etc/locale.conf
echo 'KEYMAP=us' > /etc/vconsole.conf
echo '#KEYMAP_TOGGLE=ua' >> /etc/vconsole.conf
echo 'FONT=UniCyr_8x16' >> /etc/vconsole.conf
# update packages
pacman -Syu --noconfirm --needed
# drop already installed packages
earlybatchlist=$(cat packages.txt | grep -vx "$(pacman -Qqe)")
# drop unavailable packages
rm -f ignored.txt
echo search bad package from batch list
batchlist=""
for i in $earlybatchlist
do
if $(pacman -Ss $i | grep $i -w -q)
then
batchlist+="$i "
else
echo $i >>ignored.txt
fi
printf "."
done
echo done
if [ ! -e ignored.txt ]
then
echo it seems all packages available
else
echo not all packages from batch list can be installed
echo check ignored.txt
fi
# batch installation
pacman -S $batchlist --noconfirm --needed |& tee -a /install.log
#cat packages.txt | grep -vx "$(pacman -Qqe)" > /tmp/newinstall
#xargs -a /tmp/newinstall pacman -S --noconfirm --needed |& tee -a /install.log
#rm /tmp/newinstall
systemctl enable sddm
useradd -m -g users -s /bin/bash $user_name
systemctl enable org.cups.cupsd.service
gpasswd -a $user_name sys
gpasswd -a $user_name wheel
echo $user_name' ALL=(ALL) ALL'>> /etc/sudoers
systemctl disable dhcpcd
systemctl enable NetworkManager.service
echo
echo if you want to setup a hwclock
echo to localtime, run as root after reboot
echo timedatectl set-local-rtc 1
echo
echo 'and now enter a new password for user:' $user_name
passwd $user_name
# disable root
passwd -l root