Mercurial > hgrepos > FreeBSD > ports > sysutils > local-bsdtools
comparison sbin/fjail @ 224:6713d97b4180
Copy the host's resolv.conf into a jail when configuring it.
But do not overwrite an existing resolv.conf.
| author | Franz Glasner <f.glasner@feldmann-mg.com> |
|---|---|
| date | Wed, 31 Aug 2022 13:01:35 +0200 |
| parents | dce9ba905c32 |
| children | ffd24013d346 |
comparison
equal
deleted
inserted
replaced
| 223:dce9ba905c32 | 224:6713d97b4180 |
|---|---|
| 358 echo "Setting timezone to Europe/Berlin" | 358 echo "Setting timezone to Europe/Berlin" |
| 359 ln -s ../usr/share/zoneinfo/Europe/Berlin "${_mp}/etc/localtime" | 359 ln -s ../usr/share/zoneinfo/Europe/Berlin "${_mp}/etc/localtime" |
| 360 echo "Europe/Berlin" > "${_mp}/var/db/zoneinfo" | 360 echo "Europe/Berlin" > "${_mp}/var/db/zoneinfo" |
| 361 else | 361 else |
| 362 echo "WARNING: \"${_mp}/etc/localtime\" exists already -- not changed" | 362 echo "WARNING: \"${_mp}/etc/localtime\" exists already -- not changed" |
| 363 fi | |
| 364 | |
| 365 # resolv.conf | |
| 366 if [ ! -f "${_mp}/etc/resolv.conf" ]; then | |
| 367 echo "Copying the host's resolv.conf into the jail" | |
| 368 cp -p /etc/resolv.conf "${_mp}/etc/resolv.conf" | |
| 369 else | |
| 370 echo "WARNING: \"${_mp}/etc/resolv.conf\" exists already -- not changed" | |
| 363 fi | 371 fi |
| 364 | 372 |
| 365 # | 373 # |
| 366 # hostid and hostuuid should be set (at least for consistency ressons) | 374 # hostid and hostuuid should be set (at least for consistency ressons) |
| 367 # in vnet jails (see /etc/rc.d/hostid and /etc/rc.d/hostid_save). | 375 # in vnet jails (see /etc/rc.d/hostid and /etc/rc.d/hostid_save). |
