agettyの"Hint: Num Lock off"を表示しないための設定 [openSUSE]
openSUSE 12.[1-2] の agetty では、NumLock が off の場合には "Hint: Num Lock off" というメッセージが出力される。
以下は、このメッセージを出力しないための設定方法に関するものである。
1. openSUSE 12.2 の場合
2. openSUSE 12.1 の場合
以下は、このメッセージを出力しないための設定方法に関するものである。
1. openSUSE 12.2 の場合
agetty の実行時に --nohints オプションを指定する。
例えば、下記のような設定を行う。
(1) /etc/systemd/system/getty@.service の作成
# /etc/systemd/system # cp -p /lib/systemd/system/getty\@.service .
(2) /etc/systemd/system/getty@.service の編集
# diff getty\@.service /lib/systemd/system 20c20 < ExecStart=-/sbin/agetty --nohints %I 38400 --- > ExecStart=-/sbin/agetty %I 38400 41,45d40 < Alias=getty.target.wants/getty@tty2.service < Alias=getty.target.wants/getty@tty3.service < Alias=getty.target.wants/getty@tty4.service < Alias=getty.target.wants/getty@tty5.service < Alias=getty.target.wants/getty@tty6.service --- > Alias=getty.target.wants/getty@tty1.service
(3) /etc/systemd/system/getty.target.wants/ の編集
# ln -s ../getty@.service getty@tty1.service # ln -s ../getty@.service getty@tty2.service # ln -s ../getty@.service getty@tty3.service # ln -s ../getty@.service getty@tty4.service # ln -s ../getty@.service getty@tty5.service # ln -s ../getty@.service getty@tty6.service
2. openSUSE 12.1 の場合
openSUSE 12.1 の agetty には、--nohints オプションが存在しない。
よって、本質的な対応ではないが、NumLock を on にすることにより上記の出力を抑制する。
(1) /etc/init.d/boot.local に下記の設定を追加する。
# set NumLock for tty in /dev/tty[1-6]*; do setleds -D +num < $tty done unset tty
コメント 0