Skip to content

Investigate grml-sethostname hook for dhcpcd #479

@zeha

Description

@zeha

We need to see if we need a copy of this for dhcpcd, or if it just works[tm]:

/config/files/GRMLBASE/etc/dhcp/dhclient-exit-hooks.d/grml-sethostname

# only run the command if we bound to a new ip
case "$reason" in BOUND)
if ! grep -q 'nodhcphostname' /proc/cmdline && [ -f /etc/grml_cd ] ; then

    hostname=$(busybox nslookup "$new_ip_address" | awk '/Address 1: '$new_ip_address'/ {print $4}')
    if [ -n "$hostname" ] ; then
        grml-hostname "$hostname"
        hostname -F /etc/hostname
    fi
fi
;;
esac

Metadata

Metadata

Assignees

Labels

buggrml-releaseGrml ISO release specific issues

Type

No type

Projects

Status

Accepted

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions