SHA256
1
0
forked from pool/filesystem
Dominique Leuenberger 2018-05-25 19:33:46 +00:00 committed by Git OBS Bridge
commit a50eb8ec9d
2 changed files with 20 additions and 0 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu May 17 15:19:29 CEST 2018 - ro@suse.de
- pretrans lua script: try to move away /var/run and /var/lock
unless they are already symlinks (bsc#1084119)
-------------------------------------------------------------------
Tue Mar 27 17:44:09 UTC 2018 - msuchanek@suse.com

View File

@ -212,12 +212,26 @@ install fs-var.conf $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/fs-var.conf
%pretrans -p <lua>
os.remove ("/usr/include/X11")
os.remove ("/usr/lib/X11")
if not posix.readlink("/var/run") then
os.rename("/var/run","/var/run.rpmsave.tmpx")
end
if not posix.readlink("/var/lock") then
os.rename("/var/lock","/var/lock.rpmsave.tmpx")
end
if not posix.stat("/var/run") then
posix.symlink("/run","/var/run")
end
if not posix.stat("/var/lock") then
posix.symlink("/run/lock","/var/lock")
end
if posix.stat("/var/run.rpmsave.tmpx") then
os.execute("mv /var/run.rpmsave.tmpx/* /var/run")
os.remove("/var/run.rpmsave.tmpx")
end
if posix.stat("/var/lock.rpmsave.tmpx") then
os.execute("mv /var/lock.rpmsave.tmpx/* /var/lock")
os.remove("/var/lock.rpmsave.tmpx")
end
%files -f filesystem.list
/usr/lib/tmpfiles.d/fs-var.conf