[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#567468: marked as done (please set hostname via sysctl early on)



Your message dated Mon, 07 Dec 2015 01:02:32 +0000
with message-id <1449450152.2824.59.camel@decadent.org.uk>
and subject line Re: please set hostname via sysctl early on
has caused the Debian Bug report #567468,
regarding please set hostname via sysctl early on
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
567468: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=567468
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: initramfs-tools
Version: 0.93.4
Severity: wishlist

mdadm in incremental mode needs the hostname to be able to work
without a configuration file, which would make RAID-boot much more
robust. Instead of mdadm touching
/proc/sys/kernel/{host,domain}name, it feels like initramfs should
do that.

The attached scripts take care of it. hostname is the hook, and
00hostname the script for init-top. It might make more sense to put
this into local-top though, I don't really know how it interacts
with netboot.

-- 
 .''`.   martin f. krafft <madduck@d.o>      Related projects:
: :'  :  proud Debian developer               http://debiansystem.info
`. `'`   http://people.debian.org/~madduck    http://vcs-pkg.org
  `-  Debian - when you have better things to do than fixing systems
#!/bin/sh
#
# initramfs script to inform the kernel about the hostname early on
#
# Copyright © 2010 martin f. krafft <madduck@debian.org>
# Released under the terms of the Artistic Licence 2.0
#
set -eu

case "${1:-}" in prereqs) exit 0;; esac

if [ -s /conf/hostname ]; then
  . /scripts/functions

  HOSTNAME="$(cat /conf/hostname)"
  log_begin_msg "Setting hostname to $HOSTNAME"

  case "$HOSTNAME" in
    *.*)
      echo "${HOSTNAME#*.}" >/proc/sys/kernel/domainname
      HOSTNAME="${HOSTNAME%%.*}"
      ;;
  esac
  echo "$HOSTNAME" >/proc/sys/kernel/hostname

  log_end_msg
fi

exit
#!/bin/sh
#
# initramfs hook to store the hostname in the initrd
#
# Copyright © 2010 martin f. krafft <madduck@debian.org>
# Released under the terms of the Artistic Licence 2.0
#
set -eu

exec hostname --fqdn > $DESTDIR/conf/hostname

Attachment: digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/)


--- End Message ---
--- Begin Message ---
This is not going to happen, so closing.

Ben.

-- 
Ben Hutchings
Theory and practice are closer in theory than in practice.
                                - John Levine, moderator of comp.compilers

Attachment: signature.asc
Description: This is a digitally signed message part


--- End Message ---

Reply to: