Legacy resin startup script


#1

Hi there. This is a fairly specific question related to a startup script we run on our machines. I’ve listed it below. It was developed with the help of resin staff a few years ago and was meant to overcome some issues we were seeing at the time. I suspect it is no longer needed but I wanted to see if anyone on your end could take a peek and verify that it is not needed.

Thanks!

#!/bin/bash

mkdir -p /tmp
mount -t devtmpfs none /tmp
mkdir -p /tmp/shm
mount --move /dev/shm /tmp/shm
mkdir -p /tmp/mqueue
mount --move /dev/mqueue /tmp/mqueue
mkdir -p /tmp/pts
mount --move /dev/pts /tmp/pts
touch /tmp/console
mount --move /dev/console /tmp/console
umount /dev || true
mount --move /tmp /dev

mount -t tmpfs dbus /run/dbus

# Since the devpts is mounted with -o newinstance by Docker, we need to make
# /dev/ptmx point to its ptmx.
# ref: https://www.kernel.org/doc/Documentation/filesystems/devpts.txt
ln -sf /dev/pts/ptmx /dev/ptmx

mount -t debugfs nodev /sys/kernel/debug

#3

:speech_balloon:Hello Areth
Do you remember which issues this script was meant to overcome?
Do you have a link to a discussion that led to the creation of this script?
Where do you run it?

Most probably, the changes made by this script are required by your app.


#4

I’m working on digging that information up. I was hoping it might be obvious from the script what was going on. I’ll seee what I can figure out and re-post here if you are interested. Thanks!