#!/bin/sh #DEP:openldap #DEP:openssl #DEP:libtermcap #DEP:Linux_PAM #DEP:libtool #DEP:cyrus_sasl CWD=`pwd` TMP=/tmp/tmp PKG=/tmp/pkg rm -rf $PKG mkdir -p $PKG VERSION=2.2.9 ARCH=${ARCH:-i486} BUILD=1DatuX NAME=radius mkdir -p $TMP cd $TMP tar xjvf $CWD/freeradius-server-$VERSION.tar.bz2 || exit 1 cd freeradius-server-$VERSION || exit 1 echo "Uitvoeren van configure..." && ./configure --prefix=/usr \ --sysconfdir=/home/system/radius \ --localstatedir=/var \ --sbindir=/usr/sbin \ --libdir=/usr/lib \ --libexecdir=/usr/sbin || exit 1 make || exit 1 make R="${PKG}" install || exit 1 #deamontools zooi fixxen mkdir -p $PKG/service/radius cat << EOF > $PKG/service/radius/run #!/bin/sh # LDAP Settings. LDAPPASSWD="\`cat /etc/webint/LDAP_MASTER_PASSWD\`" cat /home/system/radius/raddb/radiusd.conf | sed 's/^\t\tpassword = .*/\t\tpassword = '\$LDAPPASSWD'/' >> /home/system/radius/raddb/radiusd.conf-new if [ -s /home/system/radius/raddb/radiusd.conf-new ]; then mv /home/system/radius/raddb/radiusd.conf-new /home/system/radius/raddb/radiusd.conf fi exec /usr/sbin/radiusd -f -l /var/log/radius/radius.log EOF chmod +x $PKG/service/radius/run # En uiteraard mag de vette postinstall niet ontbreken. mkdir -p $PKG/etc/postinst.d/ cp $CWD/post.radius $PKG/etc/postinst.d/post.radius chmod +x $PKG/etc/postinst.d/post.radius || exit 1 #aangepaste configfiles op plek zetten rm -rf $PKG/home/system/radius/raddb || exit 1 mkdir -p $PKG/home/system/radius/raddb || exit 1 cp -R $CWD/raddb $PKG/home/system/radius/ || exit 1 #logrotate fixxen voor de logfiles mkdir -p $PKG/etc/logrotate.d cat < $PKG/etc/logrotate.d/radius /var/log/radius/radius.log { weekly rotate 4 copytruncate compress notifempty missingok } EOF chmod 644 $PKG/etc/logrotate.d/radius #### VER=$VERSION cd $CWD #strip bins and other stuff syn3_strip /tmp/pkg || exit 1 #move development stuff and create seperate development package syn3_move_dev /tmp/pkg /tmp/pkgdev || exit 1 syn3_makepkg /tmp/pkgdev $NAME""_dev $VER $ARCH || exit 1 #make main package syn3_makepkg /tmp/pkg $NAME $VER $ARCH || exit 1