FreeBSD Bugzilla – Attachment 151216 Details for
Bug 196435
Prevent @sample keyword from removing user symlinks
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
v2
sample_symlink.diff (text/plain), 870 bytes, created by
Jan Beich
on 2015-01-02 15:34:14 UTC
(
hide
)
Description:
v2
Filename:
MIME Type:
Creator:
Jan Beich
Created:
2015-01-02 15:34:14 UTC
Size:
870 bytes
patch
obsolete
>Index: Keywords/sample.ucl >=================================================================== >--- Keywords/sample.ucl (revision 376042) >+++ Keywords/sample.ucl (working copy) >@@ -21,7 +21,7 @@ post-install: <<EOD > *) sample_file="%D/%@" ;; > esac > target_file="${sample_file%.sample}" >- if ! [ -f "${target_file}" ]; then >+ if ! [ -f "${target_file}" -o -L "${target_file}" ]; then > /bin/cp -p "${sample_file}" "${target_file}" && \ > /bin/chmod u+w "${target_file}" > fi >@@ -32,7 +32,8 @@ pre-deinstall: <<EOD > *) sample_file="%D/%@" ;; > esac > target_file="${sample_file%.sample}" >- if cmp -s "${target_file}" "${sample_file}"; then >+ if ! [ -L "${target_file}" ] && \ >+ cmp -s "${target_file}" "${sample_file}"; then > rm -f "${target_file}" > else > echo "You may need to manually remove ${target_file} if it's no longer needed."
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 196435
:
151209
| 151216