-
Notifications
You must be signed in to change notification settings - Fork 150
/
start_chroot_script
executable file
·42 lines (34 loc) · 1.36 KB
/
start_chroot_script
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
#!/usr/bin/env bash
set -x
set -e
# CustomPiOS generation script
# Helper script that runs in a Raspbian chroot to create the CustomPiOS distro gui module
# Written by Guy Sheffer <guysoft at gmail dot com>
# GPL V3
source /common.sh
unpack /filesystem/opt /opt/custompios pi
unpack /filesystem/root_init /
ln -s /opt/custompios/scripts /home/pi/scripts
echo exit 101 > /usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d
apt_update_skip
apt-get install -y --force-yes matchbox-window-manager xorg lightdm xinput
if [ "$GUI_INCLUDE_ACCELERATION" == "yes" ]
then
apt_update_skip
apt-get -y --force-yes install xcompmgr libgl1-mesa-dri mesa-utils compton libconfig9
# Hack to pass non-interactive install
mv /usr/bin/whiptail /usr/bin/whiptail.bak
echo "#!/bin/bash" > /usr/bin/whiptail
echo "exit 0" >> /usr/bin/whiptail
chmod 755 /usr/bin/whiptail
apt-get -y --force-yes install rpi-chromium-mods
rm /usr/bin/whiptail
mv /usr/bin/whiptail.bak /usr/bin/whiptail
if [ -e /usr/share/X11/xorg.conf.d/99-fbturbo.conf ]; then
mv /usr/share/X11/xorg.conf.d/99-fbturbo.conf /usr/share/X11/xorg.conf.d/99-fbturbo.~
fi
systemctl enable enable_gpu_first_boot.service
else
echo "gpu_mem=128" >> /"${BASE_BOOT_MOUNT_PATH}"/config.txt
fi