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