Page MenuHomePhabricator

convert /etc/sysctl.d to /etc/default/grub.d kernel Linux boot cmdline
Open, NormalPublic

Description

Details

Impact
Normal

Event Timeline

Patrick triaged this task as Normal priority.Apr 16 2020, 11:29 AM
Patrick created this task.

We shouldn't stop using /etc/sysctl.d for compatibility. I think the best way would be to create /etc/default/grub.d/40_sysctl.cfg with:

while read -r line; do
  if [ "$line" = "" ]; then
    continue
  fi
  if [[ "$line" =~ ^# ]]; then
    continue
  fi
  GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX sysctl.${line}"
done < /etc/sysctl.d/30_security-misc.conf

Something like that. Maybe covering all of /etc/sysctl.conf and
/etc/sysctl.d folder to GRUB_CMDLINE_LINUX expansion.