- if [[ $(sed -rn 's/^ID=(.*)/\1/p' /etc/os-release) == arch ]]; then
- if ! grep -q '^\s*FILES=' /etc/mkinitcpio.conf; then
- sed -ri --follow-symlinks 's/^#(\s*FILES=.*)/\1/' /etc/mkinitcpio.conf # uncomment
- mkinitcpio -p linux
- fi
- else
- if grep -q '/root/keyscript,' /etc/crypttab; then
- sed -i --follow-symlinks 's#/root/keyscript-manual,#/root/keyscript,#' /etc/crypttab
- update-initramfs -u
- fi
+ if [[ $($sed -rn 's/^ID=(.*)/\1/p' /etc/os-release) == arch ]]; then
+ if ! grep -q '^\s*FILES=' /etc/mkinitcpio.conf; then
+ $sed -ri 's/^#(\s*FILES=.*)/\1/' /etc/mkinitcpio.conf # uncomment
+ mkinitcpio -p linux
+ fi
+ else
+ x=decrypt_keyctl
+ # old name. can remove this sometime after aug 2019
+ $sed -i "s#/root/keyscript-manual,#${x},#" /etc/crypttab
+ if grep -q "${x}," /etc/crypttab; then
+ $sed -i "s#${x},#/root/keyscript,#" /etc/crypttab
+ update-initramfs -u