Browse Source

Benjamin Schieder:


			
			
				rocklinux
			
			
		
Benjamin Schieder 19 years ago
parent
commit
ad53be138c
2 changed files with 17 additions and 4 deletions
  1. +0
    -4
      package/blindcoder/dgamelaunch/dgamelaunch.conf
  2. +17
    -0
      package/blindcoder/dgamelaunch/postinstall.sh

+ 0
- 4
package/blindcoder/dgamelaunch/dgamelaunch.conf

@ -58,13 +58,9 @@ OPTIONS=autodig,fruit:slime mold,boulder:0
# Happy hacking!
EOF
# TODO This should later get postinstall
echo -e "#!/bin/bash\n/usr/sbin/dgamelaunch -q -f /etc/dgamelaunch.conf" >${root}/usr/sbin/dgamelaunch_telnetd
chmod +x ${root}/usr/sbin/dgamelaunch_telnetd
chown 0.0 ${root}/usr/sbin/dgamelaunch_telnetd
grep -q dgamelaunch /etc/inetd.conf || cat >>/etc/inetd.conf<<EOF
#telnet stream tcp nowait root.root /usr/sbin/tcpd /usr/sbin/in.telnetd -h -L /usr/sbin/dgamelaunch_telnetd
EOF
chown 2.4 ${root}/usr/games/lib/dgamelaunch/ -R
chmod g+w ${root}/usr/games/lib/dgamelaunch/ -R
}

+ 17
- 0
package/blindcoder/dgamelaunch/postinstall.sh

@ -0,0 +1,17 @@
#!/bin/bash
if any_installed "dgamelaunch_telnetd" ; then
echo "Adding dgamelaunch to /etc/inetd.conf"
grep -q dgamelaunch /etc/inetd.conf || cat >>/etc/inetd.conf<<EOF
#telnet stream tcp nowait root.root /usr/sbin/tcpd /usr/sbin/in.telnetd -h -L /usr/sbin/dgamelaunch_telnetd
EOF
fi
if any_removed "dgamelaunch_telnetd" ; then
echo "Removing dgamelaunch from /etc/inetd.conf"
cp /etc/inetd.conf{,.bak}
tmp="`mktemp`"
rm -f $tmp
grep -v "dgamelaunch_telnetd" /etc/inetd.conf >$tmp
cat $tmp > /etc/inetd.conf
fi

Loading…
Cancel
Save