migration from private to rsa
[external/bash.git] / debian / patches / man-bashrc.dpatch
1 #! /bin/sh -e
2
3 if [ $# -eq 3 -a "$2" = '-d' ]; then
4     pdir="-d $3"
5 elif [ $# -ne 1 ]; then
6     echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
7     exit 1
8 fi
9 case "$1" in
10     -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
11     -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
12     *)
13         echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
14         exit 1
15 esac
16 exit 0
17
18 # DP: document /etc/bash.bashrc in bash man page
19
20 --- bash/doc/bash.1.orig        2008-11-29 17:37:14.000000000 +0000
21 +++ bash/doc/bash.1     2008-11-29 17:40:07.000000000 +0000
22 @@ -184,7 +184,9 @@
23  .PD
24  Execute commands from
25  .I file
26 -instead of the standard personal initialization file
27 +instead of the system wide initialization file
28 +.I /etc/bash.bashrc
29 +and the standard personal initialization file
30  .I ~/.bashrc
31  if the shell is interactive (see
32  .SM
33 @@ -215,7 +217,9 @@
34  below).
35  .TP
36  .B \-\-norc
37 -Do not read and execute the personal initialization file
38 +Do not read and execute the system wide initialization file
39 +.I /etc/bash.bashrc
40 +and the personal initialization file
41  .I ~/.bashrc
42  if the shell is interactive.
43  This option is on by default if the shell is invoked as
44 @@ -323,13 +327,15 @@
45  .PP
46  When an interactive shell that is not a login shell is started,
47  .B bash
48 -reads and executes commands from \fI~/.bashrc\fP, if that file exists.
49 +reads and executes commands from \fI/etc/bash.bashrc\fP and \fI~/.bashrc\fP,
50 +if these files exist.
51  This may be inhibited by using the
52  .B \-\-norc
53  option.
54  The \fB\-\-rcfile\fP \fIfile\fP option will force
55  .B bash
56 -to read and execute commands from \fIfile\fP instead of \fI~/.bashrc\fP.
57 +to read and execute commands from \fIfile\fP instead of
58 +\fI/etc/bash.bashrc\fP and \fI~/.bashrc\fP.
59  .PP
60  When
61  .B bash
62 @@ -415,7 +421,8 @@
63  If
64  .B bash
65  determines it is being run in this fashion, it reads and executes
66 -commands from \fI~/.bashrc\fP, if that file exists and is readable.
67 +commands from \fI~/.bashrc\fP and \fI~/.bashrc\fP, if these files
68 +exist and are readable.
69  It will not do this if invoked as \fBsh\fP.
70  The
71  .B \-\-norc
72 @@ -9293,6 +9300,9 @@
73  .FN /etc/profile
74  The systemwide initialization file, executed for login shells
75  .TP
76 +.FN /etc/bash.bashrc
77 +The systemwide per-interactive-shell startup file
78 +.TP
79  .FN ~/.bash_profile
80  The personal initialization file, executed for login shells
81  .TP