Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

jessie/cubieboard: /var/run on tmpfs , how to add a subdirectory permantly ?

Featured Replies

Hi,

 

I'm using the Igor-Image:

Linux cubieboard2 4.0.5-cubietruck #12 SMP Thu Jun 11 19:18:02 CEST 2015 armv7l GNU/Linux

I installed a program that is using a PID-file, normally under: /var/run/fhem/fhem.pid

I created a sub-folder and changed the owner and permissions.

With the next reboot, all changes where lost. I noticed that the /var/run is linked to /run and this is a tmpfs.

 

So, is there an option to add a subdirectory permanently to /run?

 

Alternatively I will add a short script, that will do these operations after reboot, but in my opinion, that is not the fancy way...

greets

  brenndorfler

 

 

A tmpfs is empty after reboot by design. So unless you populate it eg. from /etc/rc.local (which distro do you use? Wheezy, jessie, trusty?) or use daemons like tmpfs-populate another approach would be to let the PID file reside somewhere else (again: without details which distro you're using it's impossible to help).

  • Author

which distro do you use? Wheezy, jessie, trusty?

 

Sorry, I only mentioned it in the topic title: It is Debian 8 / Jessie ...

 

Yes, I understand that a tmpfs is empty by default and that it is populated early in the boot-process.

 

But: Where/How is this task normally configured?

Sorry, I only mentioned it in the topic title: It is Debian 8 / Jessie ...

 

Sorry, I've overseen that. If you're using the forking method to start FHEM I would uncomment/adjust $PIDFile in /etc/systemd/system/fhem.service as well set 

attr global pidfilename /path/to/fhem.pid

in fhem.cfg. And let that point to a mountpoint not residing on a tmpfs. Or you add a simple

[ -d /var/run/fhem ] || mkdir -p /var/run/fhem

to the startscript or in your case systemd service (I assume you're using systemd and not SysV init -- it seems to be possible to use Jessie with the latter too)

  • Author

I installed the fhem.deb-Package and did an update via the fhem-program itself. This package comes still with SysV init -Script.

 

Thanks for the hint, the init-script is really a good place to create the folder and set the permissions.

 

My /etc/init.d/fhem looks now like:

case "$1" in
'start')

        echo "Starting fhem..."

	[ -d /var/run/fhem ] || { mkdir -p /var/run/fhem; chmod a+w /var/run/fhem; }

Thanks!  :thumbup:

 

    brenndorfler

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.