forked from OpenHD/OpenHD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
after-install.sh
41 lines (30 loc) · 1.2 KB
/
after-install.sh
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
#!/usr/bin/env bash
systemctl disable osd
systemctl enable openhdconfig
systemctl enable openhd_system
systemctl enable openhd_security
mkdir -p /wbc_tmp
mkdir -p /media/usb
# crude hack to avoid making people put fonts somewhere else
cp -a /usr/local/share/openhd/osdfonts/*.ttf /boot/osdfonts/ > /dev/null 2>&1 || true
# these are intentionally written with spaces around them to avoid false negatives if people
# edit the fstab file and change the rest of the line, the way these are written it will still
# find them as long as a line for each of these mountpoints is present
grep " /tmp " /etc/fstab
if [[ "$?" -ne 0 ]]; then
echo "tmpfs /tmp tmpfs nosuid,nodev,noatime,size=10M 0 0" >> /etc/fstab
fi
grep " /var/log " /etc/fstab
if [[ "$?" -ne 0 ]]; then
echo "tmpfs /var/log tmpfs nosuid,nodev,noatime,size=10M 0 0" >> /etc/fstab
fi
grep " /var/tmp " /etc/fstab
if [[ "$?" -ne 0 ]]; then
echo "tmpfs /var/tmp tmpfs nosuid,nodev,noatime,size=10M 0 0" >> /etc/fstab
fi
# enable the loopback module if it isn't already, so that seek and flir cameras can be used
grep "v4l2loopback" /etc/modules
if [[ "$?" -ne 0 ]]; then
echo "v4l2loopback" >> /etc/modules
fi
mount -oremount,ro /boot || true