blob: 92e37d0df159955a39e09285f09f904fc7a65aa3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
Dont update makewhatis files if they're on readonly filesystems
http://bugs.gentoo.org/163932
--- src/makewhatis.sh
+++ src/makewhatis.sh
@@ -184,6 +188,25 @@
if [ x$verbose != x ]; then
echo "about to enter $mandir" > /dev/stderr
fi
+
+ # kludge for Slackware's /usr/man/preformat
+ if [ $mandir = /usr/man/preformat ]
+ then
+ mandir1=/usr/man
+ else
+ mandir1=$mandir
+ fi
+
+ # if $mandir is on a readonly partition and we cannot update the whatis
+ # file, then let's simply skip it
+ if ! touch ${mandir1}/whatis 2> /dev/null
+ then
+ if [ x$verbose != x ]; then
+ echo skipping $mandir - whatis file is readonly > /dev/stderr
+ fi
+ continue
+ fi
+
if [ -s ${mandir}/whatis -a $pages = man -a x$update = x ]; then
if [ x$verbose != x ]; then
echo skipping $mandir - we did it already > /dev/stderr
@@ -407,14 +430,6 @@
cd $here
- # kludge for Slackware's /usr/man/preformat
- if [ $mandir = /usr/man/preformat ]
- then
- mandir1=/usr/man
- else
- mandir1=$mandir
- fi
-
if [ -f ${mandir1}/whatis ]
then
cat ${mandir1}/whatis >> $TMPFILE
|