Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save lidgnulinux/a6be62594529f2b0e72d953e7cc1d968 to your computer and use it in GitHub Desktop.
Save lidgnulinux/a6be62594529f2b0e72d953e7cc1d968 to your computer and use it in GitHub Desktop.
Simple fix for echo error invalid argument on sshd init service LFS.

How to Fix "echo: error invalid argument" for sshd init service on LFS.

Why does it happen ?

Honestly, I don't really know.

Prerequisites

  • Editor text, I use vim.
  • Sshd init service file, It usually exist at /etc/rc.d/init.d/sshd.

Steps

  1. Open the sshd init service file !
  2. Find line contains echo '-16' > /proc/${pid}/oom_score_adj !
  3. Change the line into echo -n '-16' > /proc/${pid}/oom_score_adj !
  4. Try run the init service !
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment