evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / by-name / go / google-guest-configs / fix-paths.patch
blob7c9a86f106014d9d5a7ff8c8d87a3e2276640716
1 diff -ru3 source.old/src/lib/udev/google_nvme_id source.new/src/lib/udev/google_nvme_id
2 --- source.old/src/lib/udev/google_nvme_id 1970-01-01 03:00:01.000000000 +0300
3 +++ source.new/src/lib/udev/google_nvme_id 2022-02-05 13:30:00.986242869 +0300
4 @@ -17,7 +17,7 @@
5 # the metadata server
7 # Locations of the script's dependencies
8 -readonly nvme_cli_bin=/usr/sbin/nvme
9 +readonly nvme_cli_bin=@nvme@
11 # Bash regex to parse device paths and controller identification
12 readonly NAMESPACE_NUMBER_REGEX="/dev/nvme[[:digit:]]+n([[:digit:]]+).*"
13 diff -ru3 source.old/src/lib/udev/rules.d/64-gce-disk-removal.rules source.new/src/lib/udev/rules.d/64-gce-disk-removal.rules
14 --- source.old/src/lib/udev/rules.d/64-gce-disk-removal.rules 1970-01-01 03:00:01.000000000 +0300
15 +++ source.new/src/lib/udev/rules.d/64-gce-disk-removal.rules 2022-02-05 13:27:42.635300567 +0300
16 @@ -14,4 +14,4 @@
18 # When a disk is removed, unmount any remaining attached volumes.
20 -ACTION=="remove", SUBSYSTEM=="block", KERNEL=="sd*|vd*|nvme*", RUN+="/bin/sh -c '/bin/umount -fl /dev/$name && /usr/bin/logger -p daemon.warn -s WARNING: hot-removed /dev/$name that was still mounted, data may have been corrupted'"
21 +ACTION=="remove", SUBSYSTEM=="block", KERNEL=="sd*|vd*|nvme*", RUN+="@sh@ -c '@umount@ -fl /dev/$name && @logger@ -p daemon.warn -s WARNING: hot-removed /dev/$name that was still mounted, data may have been corrupted'"
22 diff -ru3 source.old/src/lib/udev/rules.d/65-gce-disk-naming.rules source.new/src/lib/udev/rules.d/65-gce-disk-naming.rules
23 --- source.old/src/lib/udev/rules.d/65-gce-disk-naming.rules 1970-01-01 03:00:01.000000000 +0300
24 +++ source.new/src/lib/udev/rules.d/65-gce-disk-naming.rules 2022-02-05 13:27:05.053107964 +0300
25 @@ -21,11 +21,11 @@
26 KERNEL=="sd*|vd*", IMPORT{program}="scsi_id --export --whitelisted -d $tempnode"
28 # NVME Local SSD naming
29 -KERNEL=="nvme*n*", ATTRS{model}=="nvme_card", PROGRAM="/bin/sh -c 'nsid=$$(echo %k|sed -re s/nvme[0-9]+n\([0-9]+\).\*/\\1/); echo $$((nsid-1))'", ENV{ID_SERIAL_SHORT}="local-nvme-ssd-%c"
30 +KERNEL=="nvme*n*", ATTRS{model}=="nvme_card", PROGRAM="@sh@ -c 'nsid=$$(echo %k|sed -re s/nvme[0-9]+n\([0-9]+\).\*/\\1/); echo $$((nsid-1))'", ENV{ID_SERIAL_SHORT}="local-nvme-ssd-%c"
31 KERNEL=="nvme*", ATTRS{model}=="nvme_card", ENV{ID_SERIAL}="Google_EphemeralDisk_$env{ID_SERIAL_SHORT}"
33 # NVME Persistent Disk Naming
34 -KERNEL=="nvme*n*", ATTRS{model}=="nvme_card-pd", IMPORT{program}="google_nvme_id -d $tempnode"
35 +KERNEL=="nvme*n*", ATTRS{model}=="nvme_card-pd", IMPORT{program}="@out@/lib/udev/google_nvme_id -d $tempnode"
37 # Symlinks
38 KERNEL=="sd*|vd*|nvme*", ENV{DEVTYPE}=="disk", SYMLINK+="disk/by-id/google-$env{ID_SERIAL_SHORT}"
39 diff -ru3 source.old/src/sbin/google-dhclient-script source.new/src/sbin/google-dhclient-script
40 --- source.old/src/sbin/google-dhclient-script 1970-01-01 03:00:01.000000000 +0300
41 +++ source.new/src/sbin/google-dhclient-script 2022-02-05 13:29:37.430058984 +0300
42 @@ -31,7 +31,6 @@
43 # This script is found in EL 7 and used to fix local routing in EL 6.
44 # ----------
46 -PATH=/bin:/usr/bin:/sbin
47 # scripts in dhclient.d/ use $SAVEDIR (#833054)
48 SAVEDIR=/var/lib/dhclient
50 @@ -58,9 +57,9 @@
51 if need_hostname; then
52 status=1
53 if [ -n "${new_ip_address}" ]; then
54 - eval $(/bin/ipcalc --silent --hostname ${new_ip_address} ; echo "status=$?")
55 + eval $(ipcalc --silent --hostname ${new_ip_address} ; echo "status=$?")
56 elif [ -n "${new_ip6_address}" ]; then
57 - eval $(/bin/ipcalc --silent --hostname ${new_ip6_address} ; echo "status=$?")
58 + eval $(ipcalc --silent --hostname ${new_ip6_address} ; echo "status=$?")
61 if [ ${status} -eq 0 ]; then