-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathroot-setup-devuan.sh
More file actions
77 lines (67 loc) · 2.81 KB
/
root-setup-devuan.sh
File metadata and controls
77 lines (67 loc) · 2.81 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
#!/bin/sh
# Initial configuration by root
echo "Please read this shell script before running it. Hit Enter to continue: "
read tmpvar
cat >/etc/environment <<EOF
#http_proxy=http://192.168.1.2:3128/
#https_proxy=http://192.168.1.2:3128/
EOF
cat >/etc/apt/apt.conf.d/00myconf <<EOF
APT::Default-Release "chimaera";
APT::Install-Recommends 0;
APT::Get::Purge 1;
APT::Get::Upgrade-Allow-New 1;
EOF
cat >/etc/apt/sources.list <<EOF
deb http://deb.devuan.org/merged chimaera main contrib non-free
deb-src http://deb.devuan.org/merged chimaera main contrib non-free
deb http://deb.devuan.org/merged ceres main contrib non-free
deb-src http://deb.devuan.org/merged ceres main contrib non-free
EOF
cat >>/root/.bashrc <<EOF
export LANG=C.UTF-8
export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/games
EOF
cat >>/etc/modules <<EOF
reset_raspberrypi
raspberrypi_cpufreq
raspberrypi_hwmon
EOF
echo 'CMA="256M@256M"' >>/etc/default/raspi-firmware
apt-get update
apt-get -y --purge --autoremove --install-recommends install tasksel/ceres tasksel-data/ceres
apt-get -y --purge --autoremove --no-install-recommends install alsa-utils alsa-ucm-conf pciutils usbutils bluetooth bluez bluez-firmware
apt-get -y --purge --autoremove --no-install-recommends install desktop-base xfonts-base
apt-get -y --purge --autoremove --no-install-recommends install postfix mailutils
apt-get -y --purge --autoremove --no-install-recommends install popularity-contest qemu-user-static binfmt-support reportbug unattended-upgrades rng-tools5 linux-cpupower debian-keyring apparmor-utils apparmor openssh-server xauth
echo "PermitRootLogin yes" >>/etc/ssh/sshd_config
apt-get -y --purge --autoremove --no-install-recommends install libavcodec-extra libavfilter-extra va-driver-all vdpau-driver-all
apt-get -y --purge --autoremove --no-install-recommends install appmenu-gtk3-module libcanberra-gtk3-module
apt-get -y --purge --autoremove --no-install-recommends install xserver-xorg-core xserver-xorg-input-all
apt-get -y --purge --autoremove --install-recommends install weston firefox-esr mrboom fonts-noto-color-emoji
apt-get -y --purge --autoremove --install-recommends install task-xfce-desktop/ceres task-desktop/ceres
rm /etc/resolv.conf
cat >/etc/resolv.conf <<EOF
options edns0
nameserver 192.168.1.2
EOF
chmod a-w /etc/resolv.conf
echo -n "Ordinary login user: "
read NONROOTUSER
adduser $NONROOTUSER
# See https://wiki.debian.org/SystemGroups
for g in cdrom floppy audio video plugdev kvm netdev scanner debci libvirt lp adm fax tty bluetooth pulse-access; do
if fgrep -q $g /etc/group; then
adduser $NONROOTUSER $g
fi
done
mkdir -p /home/$NONROOTUSER/.config
cat >/home/$NONROOTUSER/.config/weston.ini <<EOF
[core]
use-pixman=true
[keyboard]
keymap_layout=jp
[shell]
locking=false
EOF
chown -R ${NONROOTUSER}.${NONROOTUSER} /home/$NONROOTUSER/.config