0005-dhcp-client-fix-invoke-dhclient-script-failed-on-Rea.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. From 2e8ff0e4f6d39e346ea86b8c514ab4ccc78fa359 Mon Sep 17 00:00:00 2001
  2. From: Hongxu Jia <hongxu.jia@windriver.com>
  3. Date: Tue, 15 Aug 2017 15:24:14 +0800
  4. Subject: [PATCH 05/11] dhcp-client: fix invoke dhclient-script failed on
  5. Read-only file system
  6. In read-only file system, '/etc' is on the readonly partition,
  7. and '/etc/resolv.conf' is symlinked to a separate writable
  8. partition.
  9. In this situation, we create temp files 'resolv.conf.dhclient-new'
  10. in /tmp dir.
  11. Upstream-Status: Pending
  12. Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
  13. ---
  14. client/scripts/linux | 2 +-
  15. 1 file changed, 1 insertion(+), 1 deletion(-)
  16. Index: dhcp-4.4.3/client/scripts/linux
  17. ===================================================================
  18. --- dhcp-4.4.3.orig/client/scripts/linux
  19. +++ dhcp-4.4.3/client/scripts/linux
  20. @@ -40,7 +40,7 @@ make_resolv_conf() {
  21. # DHCPv4
  22. if [ -n "$new_domain_search" ] || [ -n "$new_domain_name" ] ||
  23. [ -n "$new_domain_name_servers" ]; then
  24. - new_resolv_conf=/etc/resolv.conf.dhclient-new
  25. + new_resolv_conf=/tmp/resolv.conf.dhclient-new
  26. rm -f $new_resolv_conf
  27. if [ -n "$new_domain_name" ]; then