1 |
On Tuesday 20 October 2015 19:22:48 Matthias Gerstner wrote: |
2 |
>Hi Alan, |
3 |
> |
4 |
>> I simply want to disable that one particular beeping at shutdown time. |
5 |
> |
6 |
>well this topic made me curious where the beep is coming from. |
7 |
> |
8 |
>It does originate from the shutdown command itself which is part of the |
9 |
>sys-apps/sysvinit package. In this package's source you find can a file |
10 |
>"src/dowall.c", where you will in turn find a function "wall(...)". |
11 |
> |
12 |
>This is the function where the warning messages will be produced that |
13 |
>show up in the terminal and the message is produced like this: |
14 |
> |
15 |
>snprintf(line, sizeof(line), |
16 |
> "\007\r\nBroadcast message from %s@%s %s(%s):\r\n\r\n", |
17 |
> user, hostname, tty, date); |
18 |
> |
19 |
>The "\007" is the beep you're getting. It's a bell character that you |
20 |
>can produce manually by doing this, too: |
21 |
> |
22 |
>echo -e "\007" |
23 |
> |
24 |
>Unfortunately the bell character is hard coded into the warning message. |
25 |
>Also there seems to be no way to suppress the warning message. |
26 |
[...] |
27 |
|
28 |
If it's caused by the call to wall(), then maybe the --no-wall option to |
29 |
shutdown will help? |
30 |
|
31 |
>Regards |
32 |
> |
33 |
>Matthias |
34 |
|
35 |
HTH |
36 |
-- |
37 |
Marc Joliet |
38 |
-- |
39 |
"People who think they know everything really annoy those of us who know we |
40 |
don't" - Bjarne Stroustrup |