Commit a400440
committed
guestfs: fix debian13 nsswitch.conf edit
The debian13 guests come with an nsswitch.conf line like this:
hosts: files myhostname resolve [!UNAVAIL=return]
When we have CONFIG_GUESTFS_HAS_DISTRO_SOURCE_COPY_CAPABILITIES=y
which would be when we have say a debian13 host and a debian13 guest
and the host has a hop1 /etc/apt/sources.list, we copy the host's
sources.list so we can profit from the speedy mirrors you have.
However we need DNS to make sure we can talk to the servers and the
above line prevents that. I had first tried to just remove the UNAVAIL
entry with virt-builder command:
edit /etc/nsswitch.conf:'s/\[!UNAVAIL=return\]//'
But for the life of me this is not taking effect. So just do a brute
force wipe of the file and open code the entire set of lines we want
for debian13 for /etc/nsswitch.conf.
Signed-off-by: Luis Chamberlain <[email protected]>1 parent c12db08 commit a400440
1 file changed
+16
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
237 | | - | |
| 237 | + | |
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
242 | 245 | | |
243 | 246 | | |
244 | | - | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
245 | 259 | | |
246 | 260 | | |
247 | 261 | | |
| |||
0 commit comments