0002-dhclient-dbus.patch 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. From be7540d31c356e80ee02e90e8bf162b7ac6e5ba5 Mon Sep 17 00:00:00 2001
  2. From: Hongxu Jia <hongxu.jia@windriver.com>
  3. Date: Tue, 15 Aug 2017 14:56:56 +0800
  4. Subject: [PATCH 02/11] dhclient dbus
  5. Upstream-Status: Inappropriate [distribution]
  6. Rebase to 4.3.6
  7. Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
  8. ---
  9. client/scripts/bsdos | 5 +++++
  10. client/scripts/freebsd | 5 +++++
  11. client/scripts/linux | 5 +++++
  12. client/scripts/netbsd | 5 +++++
  13. client/scripts/openbsd | 5 +++++
  14. client/scripts/solaris | 5 +++++
  15. 6 files changed, 30 insertions(+)
  16. Index: dhcp-4.4.3/client/scripts/bsdos
  17. ===================================================================
  18. --- dhcp-4.4.3.orig/client/scripts/bsdos
  19. +++ dhcp-4.4.3/client/scripts/bsdos
  20. @@ -45,6 +45,11 @@ exit_with_hooks() {
  21. . /etc/dhclient-exit-hooks
  22. fi
  23. # probably should do something with exit status of the local script
  24. + if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
  25. + dbus-send --system --dest=com.redhat.dhcp \
  26. + --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
  27. + 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
  28. + fi
  29. exit $exit_status
  30. }
  31. Index: dhcp-4.4.3/client/scripts/freebsd
  32. ===================================================================
  33. --- dhcp-4.4.3.orig/client/scripts/freebsd
  34. +++ dhcp-4.4.3/client/scripts/freebsd
  35. @@ -89,6 +89,11 @@ exit_with_hooks() {
  36. . /etc/dhclient-exit-hooks
  37. fi
  38. # probably should do something with exit status of the local script
  39. + if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
  40. + dbus-send --system --dest=com.redhat.dhcp \
  41. + --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
  42. + 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
  43. + fi
  44. exit $exit_status
  45. }
  46. Index: dhcp-4.4.3/client/scripts/linux
  47. ===================================================================
  48. --- dhcp-4.4.3.orig/client/scripts/linux
  49. +++ dhcp-4.4.3/client/scripts/linux
  50. @@ -174,6 +174,11 @@ exit_with_hooks() {
  51. exit_status=$?
  52. fi
  53. + if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
  54. + dbus-send --system --dest=com.redhat.dhcp \
  55. + --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
  56. + 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
  57. + fi
  58. exit $exit_status
  59. }
  60. Index: dhcp-4.4.3/client/scripts/netbsd
  61. ===================================================================
  62. --- dhcp-4.4.3.orig/client/scripts/netbsd
  63. +++ dhcp-4.4.3/client/scripts/netbsd
  64. @@ -45,6 +45,11 @@ exit_with_hooks() {
  65. . /etc/dhclient-exit-hooks
  66. fi
  67. # probably should do something with exit status of the local script
  68. + if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
  69. + dbus-send --system --dest=com.redhat.dhcp \
  70. + --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
  71. + 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
  72. + fi
  73. exit $exit_status
  74. }
  75. Index: dhcp-4.4.3/client/scripts/openbsd
  76. ===================================================================
  77. --- dhcp-4.4.3.orig/client/scripts/openbsd
  78. +++ dhcp-4.4.3/client/scripts/openbsd
  79. @@ -45,6 +45,11 @@ exit_with_hooks() {
  80. . /etc/dhclient-exit-hooks
  81. fi
  82. # probably should do something with exit status of the local script
  83. + if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
  84. + dbus-send --system --dest=com.redhat.dhcp \
  85. + --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
  86. + 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
  87. + fi
  88. exit $exit_status
  89. }
  90. Index: dhcp-4.4.3/client/scripts/solaris
  91. ===================================================================
  92. --- dhcp-4.4.3.orig/client/scripts/solaris
  93. +++ dhcp-4.4.3/client/scripts/solaris
  94. @@ -26,6 +26,11 @@ exit_with_hooks() {
  95. . /etc/dhclient-exit-hooks
  96. fi
  97. # probably should do something with exit status of the local script
  98. + if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
  99. + dbus-send --system --dest=com.redhat.dhcp \
  100. + --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
  101. + 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
  102. + fi
  103. exit $exit_status
  104. }