[opensuse] Still problems creating directories in /media
Hi, I posted a while back about this and got some help in that I needed to move my script from /etc/tmpdirs.d/ to /etc/tmpfiles.d/ to get things setup with systemd. However, this didn't do the trick. The script is executable and has the following content: -> cat /etc/tmpfiles.d/02_media #!/bin/sh mediaDirs=( os11332 os11364 os11432 os11464 os12132 os12164 sle10sp432sdk \ sle10sp464sdk sle11sp132sdk sle11sp164sdk sled1032 sled1064 \ sled10sp432 sled10sp464 sled11sp132 sled11sp164 sles1032 \ sles1064 sles10sp432 sles10sp464 sles11sp132 sles11sp164) for medDir in ${mediaDirs[@]};do test -d /media/$medDir || mkdir /media/$medDir done After reboot the /media directory is empty :( , when I run the script manually the directories are created as expected. Does anyone have an idea why this is not working? Please don't answer with "use sysv-init" as that will not help me. If it's a bug in systemd then I'll just have to wait for a fix. Thanks, Robert -- Robert Schweikert MAY THE SOURCE BE WITH YOU SUSE-IBM Software Integration Center LINUX Tech Lead rjschwei@suse.com rschweik@ca.ibm.com 781-464-8147 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2012-03-07 20:38, Robert Schweikert wrote:
After reboot the /media directory is empty :( , when I run the script manually the directories are created as expected.
That's an intentional feature of 12.1. If you want your directories to be permanent, do not use /media. - -- Cheers / Saludos, Carlos E. R. (from 11.4 x86_64 "Celadon" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAk9X0IIACgkQIvFNjefEBxrN4wCeKoDnJowONbOIITCXgGpEZy1V HN4AoJ/c0n6MRuaVlnZrJs/mdZ4nh22I =Ahh4 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 03/07/2012 04:17 PM, Carlos E. R. wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 2012-03-07 20:38, Robert Schweikert wrote:
After reboot the /media directory is empty :( , when I run the script manually the directories are created as expected.
That's an intentional feature of 12.1. If you want your directories to be permanent, do not use /media.
I thought the /etc/tmpfiles directory is intended to deal with this, such that one can create things at strtup even on tmpfs. Can you please be a bit more explicit in your explanation about why this is not working? "That's an intentional feature" doesn't give me much to go on to understand the issue at hand. Thanks, Robert -- Robert Schweikert MAY THE SOURCE BE WITH YOU SUSE-IBM Software Integration Center LINUX Tech Lead rjschwei@suse.com rschweik@ca.ibm.com 781-464-8147 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2012-03-07 23:04, Robert Schweikert wrote:
On 03/07/2012 04:17 PM, Carlos E. R. wrote:
Can you please be a bit more explicit in your explanation about why this is not working? "That's an intentional feature" doesn't give me much to go on to understand the issue at hand.
/media is a filesystem in ram, so it gets deleted on every reboot, and that is intentional. I do not know about /etc/tmpfiles. - -- Cheers / Saludos, Carlos E. R. (from 11.4 x86_64 "Celadon" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAk9X3OIACgkQIvFNjefEBxo0ggCgi1QmRfbHEZlG/WkKlzXrVzi1 s9sAoKdFYGd4Y/750quD8rf0qqzjZGL/ =u9cP -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wednesday, March 07, 2012 23:04:36 Robert Schweikert wrote:
On 03/07/2012 04:17 PM, Carlos E. R. wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 2012-03-07 20:38, Robert Schweikert wrote:
After reboot the /media directory is empty :( , when I run the script manually the directories are created as expected.
That's an intentional feature of 12.1. If you want your directories to be permanent, do not use /media.
I thought the /etc/tmpfiles directory is intended to deal with this, such that one can create things at strtup even on tmpfs.
Yes, exactly. You're on the right track- just using a script instead of a config file... Andeas -- Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg) GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wednesday, March 07, 2012 20:38:04 Robert Schweikert wrote:
Hi,
I posted a while back about this and got some help in that I needed to move my script from /etc/tmpdirs.d/ to /etc/tmpfiles.d/ to get things setup with systemd. However, this didn't do the trick.
The script is executable and has the following content:
-> cat /etc/tmpfiles.d/02_media #!/bin/sh mediaDirs=( os11332 os11364 os11432 os11464 os12132 os12164 sle10sp432sdk \ sle10sp464sdk sle11sp132sdk sle11sp164sdk sled1032 sled1064 \ sled10sp432 sled10sp464 sled11sp132 sled11sp164 sles1032 \ sles1064 sles10sp432 sles10sp464 sles11sp132 sles11sp164)
for medDir in ${mediaDirs[@]};do test -d /media/$medDir || mkdir /media/$medDir done
After reboot the /media directory is empty :( , when I run the script manually the directories are created as expected.
Does anyone have an idea why this is not working?
Please don't answer with "use sysv-init" as that will not help me. If it's a bug in systemd then I'll just have to wait for a fix.
Pleae read man tmpfiles.d, it will explain what needs to be done. Basically: the file needs to be called /etc/tmpfiles.d/02_media and contents is something like: d /media/os11332 0755 root root tmpfiles is not a script - it's a configuration file, Andreas -- Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg) GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
AJ, Thanks On 03/08/2012 03:18 AM, Andreas Jaeger wrote:
On Wednesday, March 07, 2012 20:38:04 Robert Schweikert wrote:
Hi,
I posted a while back about this and got some help in that I needed to move my script from /etc/tmpdirs.d/ to /etc/tmpfiles.d/ to get things setup with systemd. However, this didn't do the trick.
The script is executable and has the following content:
-> cat /etc/tmpfiles.d/02_media #!/bin/sh mediaDirs=( os11332 os11364 os11432 os11464 os12132 os12164 sle10sp432sdk \ sle10sp464sdk sle11sp132sdk sle11sp164sdk sled1032 sled1064 \ sled10sp432 sled10sp464 sled11sp132 sled11sp164 sles1032 \ sles1064 sles10sp432 sles10sp464 sles11sp132 sles11sp164)
for medDir in ${mediaDirs[@]};do test -d /media/$medDir || mkdir /media/$medDir done
After reboot the /media directory is empty :( , when I run the script manually the directories are created as expected.
Does anyone have an idea why this is not working?
Please don't answer with "use sysv-init" as that will not help me. If it's a bug in systemd then I'll just have to wait for a fix.
Pleae read man tmpfiles.d, it will explain what needs to be done.
Basically: the file needs to be called /etc/tmpfiles.d/02_media and contents is something like:
d /media/os11332 0755 root root
tmpfiles is not a script - it's a configuration file,
Andreas
-- Robert Schweikert MAY THE SOURCE BE WITH YOU SUSE-IBM Software Integration Center LINUX Tech Lead rjschwei@suse.com rschweik@ca.ibm.com 781-464-8147 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (3)
-
Andreas Jaeger
-
Carlos E. R.
-
Robert Schweikert