2021-11-14 12:40:10 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
mount -t devtmpfs none /dev
|
|
|
|
|
|
|
|
mkdir /dev/pts
|
|
|
|
mount -t devpts none /dev/pts
|
|
|
|
|
|
|
|
mkdir /dev/shm
|
2022-02-07 13:34:39 +00:00
|
|
|
mount -t tmpfs -o nodev,nosuid,exec none /dev/shm
|
|
|
|
# ^ must be mounted "exec" to allow JIT for Squeak
|
2021-11-14 12:40:10 +00:00
|
|
|
|
|
|
|
mount -t proc none /proc
|
|
|
|
|
|
|
|
mount -t sysfs none /sys
|
|
|
|
|
|
|
|
mount -t tmpfs none /run
|
|
|
|
|
|
|
|
# Docker wants this
|
|
|
|
mount -t cgroup2 none /sys/fs/cgroup
|
|
|
|
|
|
|
|
mount -o rw,remount /
|
|
|
|
|
2022-02-09 14:50:10 +00:00
|
|
|
mkdir -p /etc/syndicate/user-settings
|
2022-02-06 22:06:55 +00:00
|
|
|
mkdir -p /run/etc/syndicate/core
|
|
|
|
mkdir -p /usr/local/etc/syndicate/core
|
2022-02-07 20:11:07 +00:00
|
|
|
mkdir -p /run/etc/syndicate/services
|
|
|
|
mkdir -p /usr/local/etc/syndicate/services
|
2021-11-14 15:02:31 +00:00
|
|
|
|
2022-02-07 11:14:24 +00:00
|
|
|
# This is a grody hack. We are replacing the infrastructure that sets up RNDIS, and in
|
|
|
|
# particular we no longer want to run the DHCP server that PostmarketOS runs by default on
|
|
|
|
# usb0. Instead we will be a DHCP client. (This was just easiest to set up.)
|
|
|
|
killall unudhcpd || true
|
2023-10-20 09:34:02 +00:00
|
|
|
# We also don't want the splash screen.
|
|
|
|
killall pbsplash || true
|
2022-02-07 11:14:24 +00:00
|
|
|
|
2023-10-20 09:33:42 +00:00
|
|
|
# This tells Rust programs built with jemallocator to be very aggressive about keeping their
|
|
|
|
# heaps small. Synit currently targets small machines. Without this, I have seen the system
|
|
|
|
# syndicate-server take around 300MB of heap when doing not particularly much; with this, it
|
|
|
|
# takes about 15MB in the same state. There is a performance penalty on being so aggressive
|
|
|
|
# about heap size, but it's more important to stay small in this circumstance right now.
|
|
|
|
export _RJEM_MALLOC_CONF="narenas:1,tcache:false,dirty_decay_ms:0,muzzy_decay_ms:0"
|
|
|
|
|
2021-11-14 12:40:10 +00:00
|
|
|
exec /sbin/synit-pid1
|