rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | SUMMARY = "Meta package adding machine name to known hosts" |
| 2 | LICENSE = "MIT" |
| 3 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" |
| 4 | |
| 5 | ALLOW_EMPTY_${PN} = "1" |
| 6 | |
| 7 | LOCALHOSTMACHINE = "127.0.0.1 ${MACHINE}" |
| 8 | |
| 9 | # on some machines starting applications as xfce4-terminal take ages without |
| 10 | # machine name in hosts |
| 11 | pkg_postinst_${PN} () { |
| 12 | if ! grep -q '${LOCALHOSTMACHINE}' $D/etc/hosts ; then |
| 13 | echo '${LOCALHOSTMACHINE}' >> $D/etc/hosts |
| 14 | fi |
| 15 | } |
| 16 | |
| 17 | PACKAGE_ARCH = "${MACHINE_ARCH}" |