2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-09-01 14:55:12 +00:00

Fix packaging of symbolic links on HP-UX when the link source already

exists in the filesystem.
This commit is contained in:
Todd C. Miller
2012-06-08 13:27:16 -04:00
parent db9f50f13c
commit f5948149e0
2 changed files with 14 additions and 14 deletions

24
pp
View File

@@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# Copyright 2012 Quest Software, Inc. ALL RIGHTS RESERVED # Copyright 2012 Quest Software, Inc. ALL RIGHTS RESERVED
pp_revision="361" pp_revision="363"
# Copyright 2012 Quest Software, Inc. ALL RIGHTS RESERVED. # Copyright 2012 Quest Software, Inc. ALL RIGHTS RESERVED.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@@ -2288,9 +2288,9 @@ pp_sd_write_files () {
# current working (source) directory, not the destination; # current working (source) directory, not the destination;
# we need to qualify them to prevent this. # we need to qualify them to prevent this.
case "$st" in case "$st" in
/*) echo "$line $st $p";; [!/]*) st="`dirname \"$p\"`/$st";;
*) echo "$line `dirname $p`/$st $p";;
esac esac
echo "$line -o $o -g $g -m $m $st $p"
;; ;;
*) *)
echo "$line -o $o -g $g -m $m $pp_destdir$p $p" echo "$line -o $o -g $g -m $m $pp_destdir$p $p"
@@ -4005,19 +4005,19 @@ pp_deb_handle_services() {
test x"yes" = x"$enable" && test x"yes" = x"$enable" &&
cat<<-. >> $pp_wrkdir/%post.run cat<<-. >> $pp_wrkdir/%post.run
# Install the service links # Install the service links
/usr/sbin/update-rc.d $svc defaults update-rc.d $svc defaults
. .
#-- prepend %preun code to stop svc #-- prepend %preun code to stop svc
cat<<-. | pp_prepend $pp_wrkdir/%preun.run cat<<-. | pp_prepend $pp_wrkdir/%preun.run
# Stop the $svc service # Stop the $svc service
if test -x /usr/sbin/invoke-rc.d; then invoke-rc.d $svc stop
/usr/sbin/invoke-rc.d $svc stop .
else
/etc/init.d/$svc stop #-- prepend %preun code to remove service
fi cat<<-. | pp_prepend $pp_wrkdir/%postun.run
# Remove the service links # Remove the service links
/usr/sbin/update-rc.d -f $svc remove update-rc.d -f $svc remove
. .
done done
#pp_deb_service_remove_common | pp_prepend $pp_wrkdir/%preun.run #pp_deb_service_remove_common | pp_prepend $pp_wrkdir/%preun.run
@@ -4378,7 +4378,7 @@ pp_backend_deb_init_svc_vars () {
lsb_required_start='$local_fs $network' lsb_required_start='$local_fs $network'
lsb_should_start= lsb_should_start=
lsb_required_stop= lsb_required_stop='$local_fs'
lsb_description= lsb_description=
start_priority=50 start_priority=50
@@ -4391,7 +4391,7 @@ pp_deb_service_make_init_script () {
local out=$pp_destdir$script local out=$pp_destdir$script
local _process _cmd local _process _cmd
pp_add_file_if_missing $script run 755 || return 0 pp_add_file_if_missing $script run 755 v || return 0
#-- start out as an empty shell script #-- start out as an empty shell script
cat <<-'.' >$out cat <<-'.' >$out

View File

@@ -247,8 +247,8 @@ still allow people to get their work done."
%files %files
$osdirs - $osdirs -
$bindir/sudo 4755 root: $bindir/sudo 04755 root:
$bindir/sudoedit 4755 root: symlink sudo $bindir/sudoedit 0755 root: symlink sudo
$sbindir/visudo 0755 $sbindir/visudo 0755
$bindir/sudoreplay 0755 $bindir/sudoreplay 0755
$includedir/sudo_plugin.h 0644 $includedir/sudo_plugin.h 0644