diff --git a/boot.dmraid b/boot.dmraid index 0047fca..9cae764 100644 --- a/boot.dmraid +++ b/boot.dmraid @@ -33,6 +33,9 @@ else DMRAID_DEVICE_TIMEOUT=0 fi +# make sure /run/lock exists as /run is tmpfs +[ -d /run/lock ] || mkdir -p /run/lock >/dev/null 2>&1 + rc_reset case "$1" in diff --git a/dmraid-move-var-lock-to-run-lock.patch b/dmraid-move-var-lock-to-run-lock.patch new file mode 100644 index 0000000..e9cc586 --- /dev/null +++ b/dmraid-move-var-lock-to-run-lock.patch @@ -0,0 +1,13 @@ +Index: 1.0.0.rc16/lib/locking/locking.c +=================================================================== +--- 1.0.0.rc16.orig/lib/locking/locking.c ++++ 1.0.0.rc16/lib/locking/locking.c +@@ -12,7 +12,7 @@ + #include "internal.h" + + /* File locking private data. */ +-static const char *lock_file = "/var/lock/dmraid/.lock"; ++static const char *lock_file = "/run/lock/dmraid/.lock"; + static int lf = -1; + + /* flock file. */ diff --git a/dmraid.changes b/dmraid.changes index 91c5de5..ed262e4 100644 --- a/dmraid.changes +++ b/dmraid.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Nov 28 12:07:36 UTC 2012 - rmilasan@suse.com + +- Move lock file to /run/lock so it wont interfere with systemd. + ------------------------------------------------------------------- Mon Jul 9 09:03:57 UTC 2012 - cfarrell@suse.com diff --git a/dmraid.spec b/dmraid.spec index 6e3aed5..678e940 100644 --- a/dmraid.spec +++ b/dmraid.spec @@ -16,13 +16,13 @@ # - Name: dmraid BuildRequires: autoconf BuildRequires: automake BuildRequires: device-mapper-devel BuildRequires: libselinux-devel BuildRequires: zlib-devel +Requires: aaa_base Requires: kpartx Url: http://people.redhat.com/~heinzm/sw/dmraid/src/ Summary: A Device-Mapper Software RAID Support Tool @@ -43,6 +43,7 @@ Patch4: handle_spaces Patch5: remove_trylock Patch6: rebuild.fix Patch7: ddf-erase +Patch8: dmraid-move-var-lock-to-run-lock.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %fillup_prereq @@ -81,6 +82,7 @@ Authors: %patch5 -p2 %patch6 -p1 %patch7 -p1 +%patch8 -p1 cp %{SOURCE3} . %build diff --git a/mkinitrd-boot.sh b/mkinitrd-boot.sh index 4a1318b..96c9e39 100644 --- a/mkinitrd-boot.sh +++ b/mkinitrd-boot.sh @@ -16,6 +16,7 @@ ## root_dmraid=1 use device mapper raid ## +[ -d /run/lock ] || mkdir -p /run/lock >/dev/null 2>&1 /sbin/dmraid -a y -p wait_for_events