]> git.pld-linux.org Git - packages/bind.git/commitdiff
- vserver safe device nodes
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 16 May 2006 14:20:50 +0000 (14:20 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    bind.spec -> 1.227

bind.spec

index 4a8f66eed6f04043ee3996fdc78229b2c5ad7681..f912a2ea46071761c3e5bb08f4767bb300fd3234 100644 (file)
--- a/bind.spec
+++ b/bind.spec
@@ -387,6 +387,20 @@ fi
 %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
 
@@ -442,8 +456,8 @@ fi
 
 # 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)
This page took 0.029582 seconds and 4 git commands to generate.