rename /media directory when replacing with symlink
This commit is contained in:
parent
9595652b22
commit
5644914f69
@ -1,7 +1,7 @@
|
|||||||
Summary: The basic directory layout for a Linux system
|
Summary: The basic directory layout for a Linux system
|
||||||
Name: filesystem
|
Name: filesystem
|
||||||
Version: 3.2
|
Version: 3.2
|
||||||
Release: 28%{?dist}
|
Release: 29%{?dist}
|
||||||
License: Public Domain
|
License: Public Domain
|
||||||
URL: https://fedorahosted.org/filesystem
|
URL: https://fedorahosted.org/filesystem
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
@ -138,6 +138,20 @@ posix.symlink("usr/%{_lib}", "/%{_lib}")
|
|||||||
posix.mkdir("/run")
|
posix.mkdir("/run")
|
||||||
posix.mkdir("/run/media")
|
posix.mkdir("/run/media")
|
||||||
posix.mkdir("/var")
|
posix.mkdir("/var")
|
||||||
|
--#/media magic to be on the safe side - to prevent loss of userdata until F24
|
||||||
|
path = "/media"
|
||||||
|
st = posix.stat(path)
|
||||||
|
if st and st.type == "directory" then
|
||||||
|
status = os.rename(path, path .. ".rpmmoved")
|
||||||
|
if not status then
|
||||||
|
suffix = 0
|
||||||
|
while not status do
|
||||||
|
suffix = suffix + 1
|
||||||
|
status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix)
|
||||||
|
end
|
||||||
|
os.rename(path, path .. ".rpmmoved")
|
||||||
|
end
|
||||||
|
end
|
||||||
posix.symlink("run/media", "/media")
|
posix.symlink("run/media", "/media")
|
||||||
posix.symlink("../run", "/var/run")
|
posix.symlink("../run", "/var/run")
|
||||||
posix.symlink("../run/lock", "/var/lock")
|
posix.symlink("../run/lock", "/var/lock")
|
||||||
@ -265,6 +279,10 @@ restorecon /run/media 2>/dev/null >/dev/null || :
|
|||||||
/var/yp
|
/var/yp
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jul 29 2014 Ondrej Vasik <ovasik@redhat.com> - 3.2-29
|
||||||
|
- rename /media directory when replacing with symlinks
|
||||||
|
to prevent potential data loss
|
||||||
|
|
||||||
* Mon Jul 28 2014 Ondrej Vasik <ovasik@redhat.com> - 3.2-28
|
* Mon Jul 28 2014 Ondrej Vasik <ovasik@redhat.com> - 3.2-28
|
||||||
- add ownership for /usr/share/licenses (#1121416)
|
- add ownership for /usr/share/licenses (#1121416)
|
||||||
- have /media as symlink to /run/media (#965918)
|
- have /media as symlink to /run/media (#965918)
|
||||||
|
Loading…
Reference in New Issue
Block a user