OSDN Git Service

small fixes
[pacbang-linux/iso-arch.git] / airootfs / root / customize_airootfs.sh
1 #!/bin/bash
2
3 set -e -u
4
5 sed -i 's/#\(en_US\.UTF-8\)/\1/' /etc/locale.gen
6 locale-gen
7
8 ln -sf /usr/share/zoneinfo/UTC /etc/localtime
9
10 #!/bin/bash
11
12 set -e -u
13
14 # Locale
15 sed -i 's/#\(en_US\.UTF-8\)/\1/' /etc/locale.gen
16 locale-gen
17 echo "LANG=en_US.UTF-8" > /etc/locale.conf
18 echo "LC_COLLATE=C" >> /etc/locale.conf
19
20 # virtual console
21 echo "KEYMAP=us" > /etc/vconsole.conf
22
23 # Time and clock
24 ln -sf /usr/share/zoneinfo/UTC /etc/localtime
25 hwclock --systohc --utc
26
27 # hostname
28 echo "pacbang" > /etc/hostname
29 echo -e "#<ip-address>\t<hostname.domain.org>\t<hostname>\n127.0.0.1\tlocalhost.localdomain\tlocalhost\n::1\tlocalhost\n127.0.1.1\tpacbang.localdomain\tpacbang\n" > /etc/hosts
30
31 usermod -s /usr/bin/zsh root
32 cp -aT /etc/skel/ /root/
33 chmod 700 /root
34
35 # add live user
36 useradd -m -p "" -g users -G "adm,audio,floppy,log,network,rfkill,scanner,storage,optical,power,wheel" -s /bin/zsh paclive
37
38 chmod 750 /etc/sudoers.d
39 chmod 440 /etc/sudoers.d/g_wheel
40 chown -R paclive:users /home/paclive
41
42 #sed -i 's/#\(PermitRootLogin \).\+/\1yes/' /etc/ssh/sshd_config
43 sed -i "s/#Server/Server/g" /etc/pacman.d/mirrorlist
44 sed -i 's/#\(Storage=\)auto/\1volatile/' /etc/systemd/journald.conf
45
46 sed -i 's/#\(HandleSuspendKey=\)suspend/\1ignore/' /etc/systemd/logind.conf
47 sed -i 's/#\(HandleHibernateKey=\)hibernate/\1ignore/' /etc/systemd/logind.conf
48 sed -i 's/#\(HandleLidSwitch=\)suspend/\1ignore/' /etc/systemd/logind.conf
49
50 systemctl disable dhcpcd.service
51 systemctl enable NetworkManager.service
52 systemctl enable pacman-init.service choose-mirror.service
53 systemctl set-default multi-user.target
54 #systemctl set-default graphical.target