uutils / uutils/coreutils

hostname: implement -F FILE

Open
#11,262 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

U - hostname
Dominant language
Rust
Stars
24.1k
Forks
2k
Avg merge
1d 5h
Merged PRs (30d)
365

Description

or, from net-tools hostname(1):

-F, --file filename
              Read the new host name from the specified file. Comments (lines
              starting with a `#') are ignored.

I'm not sure if this is out-of-scope, since I don't think GNU Coreutils hostname has it, but hostname provided by both busybox and net-tools (also has long flag --file) do.

In Alpinelinux , I keep the hostname symlink in a separate subpackage, uutils-hostname, due to this, and it looks like we don't install it for our GNU Coreutils package.

I think we, at least used to, depend on the -F flag, but right now I cannot find where

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the hostname command implementation and its command-line tests. Compare the requested -F and --file behavior with the net-tools and BusyBox description: read the new host name from the specified file and ignore comments whose lines start with #. Done means the option works and the existing hostname tests cover the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.