SPECS (AC-branch): bind.spec - vserver safe device nodes; rel 6

glen glen at pld-linux.org
Wed May 17 21:53:44 CEST 2006


Author: glen                         Date: Wed May 17 19:53:44 2006 GMT
Module: SPECS                         Tag: AC-branch
---- Log message:
- vserver safe device nodes; rel 6

---- Files affected:
SPECS:
   bind.spec (1.198.2.13 -> 1.198.2.14) 

---- Diffs:

================================================================
Index: SPECS/bind.spec
diff -u SPECS/bind.spec:1.198.2.13 SPECS/bind.spec:1.198.2.14
--- SPECS/bind.spec:1.198.2.13	Sat Apr 15 15:58:50 2006
+++ SPECS/bind.spec	Wed May 17 21:53:39 2006
@@ -18,7 +18,7 @@
 Summary(zh_CN):	Internet ÓňĂűˇţÎńĆ÷
 Name:		bind
 Version:	9.2.6
-Release:	5
+Release:	6
 Epoch:		6
 License:	BSD-like
 Group:		Networking/Daemons
@@ -389,6 +389,20 @@
 %useradd -u 58 -g 58 -d /tmp -s /bin/false -c "BIND user" named
 
 %post
+if [ "$1" = 1 ]; then
+	mknod -m 660 %{_var}/lib/named/dev/null c 1 3 2>/dev/null
+	chown root:named %{_var}/lib/named/dev/null 2>/dev/null
+	mknod -m 640 %{_var}/lib/named/dev/null c 1 8 2>/dev/null
+	chown root:named %{_var}/lib/named/dev/random 2>/dev/null
+	if [ ! -c %{_var}/lib/named/dev/null ] || [ ! -c %{_var}/lib/named/dev/random ]; then
+%banner -e %{name}-devs <<-EOF
+Device nodes were not created!!!
+
+Please read PLD Linux Vserver FAQ if you're installing %{name} inside
+vserver: <http://www.pld-linux.org/Vserver>.
+EOF
+	fi #'
+fi
 /sbin/chkconfig --add named
 %service named restart
 
@@ -441,8 +455,8 @@
 
 # devices for chrooted bind
 %attr(750,root,named) %dir %{_var}/lib/named/dev
-%dev(c,1,3) %attr(660,root,named) %{_var}/lib/named/dev/null
-%dev(c,1,8) %attr(640,root,named) %{_var}/lib/named/dev/random
+%ghost %attr(660,root,named) %{_var}/lib/named/dev/null
+%ghost %attr(640,root,named) %{_var}/lib/named/dev/random
 
 %files utils
 %defattr(644,root,root,755)
@@ -492,6 +506,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.198.2.14  2006/05/17 19:53:39  glen
+- vserver safe device nodes; rel 6
+
 Revision 1.198.2.13  2006/04/15 13:58:50  glen
 -  %useradd/%groupadd, rel 5
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/bind.spec?r1=1.198.2.13&r2=1.198.2.14&f=u



More information about the pld-cvs-commit mailing list