Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
61
rated 0 times [  61] [ 0]  / answers: 1 / hits: 30824  / 1 Year ago, mon, december 5, 2022, 10:50:19

From the technical overview of Ubuntu 11.10 Oneiric:




Ubuntu 11.10 has migrated away from /var/run, /var/lock and /dev/shm and now uses /run, /run/lock and /run/shm instead (respectively).





  • I hardcode these paths in my applications, why is this change made to Oneiric?

  • What can I do to make my applications backwards- and forward-compatible? Is there a better way other than checking first for the existence of /run, and then /var/run?


More From » filesystem

 Answers
3

The intent is to reduce the number of tmpfs file systems. On 11.04, there are separate tmpfs file systems at /var/lock, /var/run and /dev/shm. If these directories were all under a single parent directory, then only a single tmpfs would be needed. It also provides an obvious location for further runtime state data that shouldn't persist over reboots.



Unless your application depends on canonical paths of files, your application should run without modification since the old locations will be symlinked to the new ones. The AppArmor policies are one case that does depend on the real path names, which is why it was mentioned specifically.



The following links should help explain the rationale:




[#43841] Tuesday, December 6, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
hirtieve

Total Points: 207
Total Questions: 104
Total Answers: 114

Location: Cook Islands
Member since Thu, May 21, 2020
4 Years ago
;