1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
Index: clonezilla/setup/files/ocs/live-hook/ocs-live-hook-functions
===================================================================
--- clonezilla.orig/setup/files/ocs/live-hook/ocs-live-hook-functions
+++ clonezilla/setup/files/ocs/live-hook/ocs-live-hook-functions
@@ -227,12 +227,12 @@ remove_start_stop_daemon_diverts(){
# By doing apt-get --purge remove cdebootstrap-helper-diverts, it will
# Removing `diversion of /sbin/start-stop-daemon to /sbin/start-stop-daemon.REAL by cdebootstrap-helper-diverts'
# Removing `diversion of /usr/sbin/invoke-rc.d to /usr/sbin/invoke-rc.d.REAL by cdebootstrap-helper-diverts'
- if [ -e /sbin/start-stop-daemon.REAL ]; then
+ if [ -e /usr/sbin/start-stop-daemon.REAL ]; then
apt-get -y --purge remove cdebootstrap-helper-diverts
fi
# For live-build v2.x, the file name is /sbin/start-stop-daemon.orig, and no more cdebootstrap-helper-diverts in lb_chroot_dpkg. We just restore it. Otherwise the file start-stop-daemon copied to /tftpboot/node_root/sbin/ will be the temp fake one.
- if [ -e /sbin/start-stop-daemon.orig ]; then
- mv -v /sbin/start-stop-daemon.orig /sbin/start-stop-daemon
+ if [ -e /usr/sbin/start-stop-daemon.orig ]; then
+ mv -v /usr/sbin/start-stop-daemon.orig /sbin/start-stop-daemon
fi
# For live-build v3.x, the file name is renamed as start-stop-daemon.distrib by
# dpkg-divert in /usr/lib/live/build/chroot_dpkg:
@@ -264,6 +264,15 @@ remove_start_stop_daemon_diverts(){
set_start_stop_daemon_diverts(){
# For live-build v3.x, after drblpush, we have to revert the status to fake, temp one, so the rest of chroot_dpkg command won't remove the real /sbin/start-stop-daemon.
# Ref: /usr/lib/live/build/chroot_dpkg
+ # begin-remove-after: released:trixie
+ if [ "$lb_3_start_stop_daemon_revert_aliased_flag" = "true" ]; then
+ if dpkg -D /sbin/start-stop-daemon >/dev/null 2>&1; then
+ dpkg-divert --rename --add --divert /sbin/start-stop-daemon.distrib.usr-is-merged /sbin/start-stop-daemon
+ else
+ dpkg-divert --no-rename --add --divert /sbin/start-stop-daemon.distrib.usr-is-merged /sbin/start-stop-daemon
+ fi
+ fi
+ # end-remove-after
if [ "$lb_3_start_stop_daemon_revert_flag" = "true" ]; then
dpkg-divert --rename --add /usr/sbin/start-stop-daemon
cat > /usr/sbin/start-stop-daemon << EOF
@@ -274,8 +283,7 @@ EOF
chmod 755 /usr/sbin/start-stop-daemon
fi
# begin-remove-after: released:trixie
- if [ "$lb_3_start_stop_daemon_revert_aliased_flag" = "true" ]; then
- dpkg-divert --rename --add --divert /sbin/start-stop-daemon.distrib.usr-is-merged /sbin/start-stop-daemon
+ if [ "$lb_3_start_stop_daemon_revert_aliased_flag" = "true" ] && [ "$lb_3_start_stop_daemon_revert_flag" != "true" ]; then
cat > /sbin/start-stop-daemon << EOF
#!/bin/sh
@@ -326,6 +334,7 @@ done
UDEV_END
update_initramfs_flag="yes"
fi
+ # end-remove-after
}
#
append_framebuffer_modules_if_necessary() {
|