[PC-BSD Commits] r3022 - in pbibuild/modules/vsftpd: . kmenu-dir overlay-dir

svn at pcbsd.org svn at pcbsd.org
Mon Dec 1 20:38:44 PST 2008


Author: fabry
Date: 2008-12-01 20:38:41 -0800 (Mon, 01 Dec 2008)
New Revision: 3022

Added:
   pbibuild/modules/vsftpd/overlay-dir/services/
   pbibuild/modules/vsftpd/overlay-dir/vsftpd
Removed:
   pbibuild/modules/vsftpd/kmenu-dir/vsftpdstart
   pbibuild/modules/vsftpd/kmenu-dir/vsftpdstop
Modified:
   pbibuild/modules/vsftpd/build.sh
   pbibuild/modules/vsftpd/kmenu-dir/vsftpdcfg
   pbibuild/modules/vsftpd/overlay-dir/AnonDir
   pbibuild/modules/vsftpd/overlay-dir/PBI.RemoveScript.sh
   pbibuild/modules/vsftpd/overlay-dir/PBI.SetupScript.sh
   pbibuild/modules/vsftpd/overlay-dir/vsftpd.conf
Log:
modified vsftpd module.  it should compile and be ready to be tested for PC-BSD 7

Modified: pbibuild/modules/vsftpd/build.sh
===================================================================
--- pbibuild/modules/vsftpd/build.sh	2008-12-02 01:52:01 UTC (rev 3021)
+++ pbibuild/modules/vsftpd/build.sh	2008-12-02 04:38:41 UTC (rev 3022)
@@ -10,15 +10,20 @@
 ##############################################################################
 
 # Save the right version number in the removepbi.sh script
-sed -e "s,CHANGEME,vsftpd${PORTVER},g" ${PBIDIR}/scripts/removepbi.sh > /tmp/removepbi.sh
-mv /tmp/removepbi.sh ${PBIDIR}/removepbi.sh
-chmod 755 ${PBIDIR}/removepbi.sh
+sed -e "s,CHANGEME,vsftpd${PORTVER},g" $PBIDIR/scripts/removepbi.sh > /tmp/removepbi.sh
+mv /tmp/removepbi.sh $PBIDIR/removepbi.sh
+chmod 755 $PBIDIR/removepbi.sh
 
 # Save the right version number in the vsftpd.conf file
-sed -e "s,CHANGEME,${PORTVER},g" ${PBIDIR}/vsftpd.conf > /tmp/vsftpd.conf
-mv /tmp/vsftpd.conf ${PBIDIR}/vsftpd.conf
+sed -e "s,CHANGEME,vsftpd$PORTVER,g" $PBIDIR/vsftpd.conf > /tmp/vsftpd.conf
+mv /tmp/vsftpd.conf $PBIDIR/vsftpd.conf
 
 # Save the right version number in the vsftpd.conf file
-sed -e "s,CHANGEME,${PORTVER},g" ${PBIDIR}/vsftpdcfg > /tmp/vsftpdcfg
-mv /tmp/vsftpdcfg ${PBIDIR}/vsftpdcfg
-chmod 755 ${PBIDIR}/vsftpdcfg
+sed -e "s,CHANGEME,$PORTVER,g" $PBIDIR/vsftpdcfg > /tmp/vsftpdcfg
+mv /tmp/vsftpdcfg $PBIDIR/vsftpdcfg
+chmod 755 $PBIDIR/vsftpdcfg
+
+# Save the right version number in the AnonDir file
+sed -e "s,CHANGEME,$PORTVER,g" $PBIDIR/AnonDir > /tmp/AnonDir
+mv /tmp/AnonDir $PBIDIR/AnonDir
+chmod 755 $PBIDIR/AnonDir

Modified: pbibuild/modules/vsftpd/kmenu-dir/vsftpdcfg
===================================================================
--- pbibuild/modules/vsftpd/kmenu-dir/vsftpdcfg	2008-12-02 01:52:01 UTC (rev 3021)
+++ pbibuild/modules/vsftpd/kmenu-dir/vsftpdcfg	2008-12-02 04:38:41 UTC (rev 3022)
@@ -5,7 +5,7 @@
 ExeNoMenu: 0
 ExeRunRoot: 0
 ExeRunShell: 0
-ExeNotify: 1
+ExeNotify: 0
 ExeLink: 0
 ExeWebLink: 0
 ExeTaskbar: 0

Modified: pbibuild/modules/vsftpd/overlay-dir/AnonDir
===================================================================
--- pbibuild/modules/vsftpd/overlay-dir/AnonDir	2008-12-02 01:52:01 UTC (rev 3021)
+++ pbibuild/modules/vsftpd/overlay-dir/AnonDir	2008-12-02 04:38:41 UTC (rev 3022)
@@ -1,2 +1,2 @@
 #!/bin/sh
-konqueror /Programs/vsftpd2.0.5/anon_ftp
\ No newline at end of file
+konqueror /usr/home/anon_ftp

Modified: pbibuild/modules/vsftpd/overlay-dir/PBI.RemoveScript.sh
===================================================================
--- pbibuild/modules/vsftpd/overlay-dir/PBI.RemoveScript.sh	2008-12-02 01:52:01 UTC (rev 3021)
+++ pbibuild/modules/vsftpd/overlay-dir/PBI.RemoveScript.sh	2008-12-02 04:38:41 UTC (rev 3022)
@@ -6,6 +6,18 @@
 # ${2} is the username of person performing the deletion.
 # TIP: 'kdialog' should be used for user interaction. 
 #########################################
+killall vsftpd
+kdialog --title "Confirm Removal" --yesno "Do you want to remove also the anonymous folder?"
+if [ "$?" = "0" ]
+then
+  kdialog --passivepopup "Removing vsftpd anon_ftp..." 10000 &
+  PID=$!
+  rm -Rf /usr/home/anon_ftp
+
+  kill -9 $PID
+fi
+
+
 rm -fR /usr/local/libexec/vsftpd
 rm -fR /usr/local/man/man5/vsftpd.conf.5.gz
 rm -fR /usr/local/man/man8/vsftpd.8.gz
@@ -16,3 +28,10 @@
 rm -fR /usr/local/bin/vsftpdstart
 rm -fR /usr/local/bin/vsftpdstop
 rm -fR /usr/local/bin/vsftpdcfg
+rm -fR /usr/local/etc/rc.d/vsftpd
+rm -fR /PCBSD/Services/vsftpd
+pw user del -n ftp
+rm -Rf /usr/home/ftp
+cat /etc/rc.conf | grep -v "vsftpd_enable=" > /tmp/.rc.conf
+mv /tmp/.rc.conf /etc/rc.conf
+

Modified: pbibuild/modules/vsftpd/overlay-dir/PBI.SetupScript.sh
===================================================================
--- pbibuild/modules/vsftpd/overlay-dir/PBI.SetupScript.sh	2008-12-02 01:52:01 UTC (rev 3021)
+++ pbibuild/modules/vsftpd/overlay-dir/PBI.SetupScript.sh	2008-12-02 04:38:41 UTC (rev 3022)
@@ -25,42 +25,34 @@
 ln -s /Programs/${PROGDIR}/.sbin/vsftpdstop /usr/local/bin/vsftpdstop
 ln -s /Programs/${PROGDIR}/vsftpdcfg /usr/local/bin/vsftpdcfg
 
+ln -s /Programs/${PROGDIR}/services/vsftpd /PCBSD/Services/vsftpd
+
+echo "vsftpd_enable=\"YES\"" >> /etc/rc.conf
+ln -s /Programs/${PROGDIR}/vsftpd /usr/local/etc/rc.d/vsftpd
+
 USERS=$(kdialog --title "vsftp Server" --menu "vsftpd will be used by :" a "Anonymous Users ONLY" b "Local Users ONLY" c "Anonymous and Local Users")
 if [ "$?" = "0" ] 
 then 
-	if [ "$USERS" = "a" ] 
-	then 	
-	sed 's/anonymous_enable=NO/anonymous_enable=YES/g' vsftpd.conf > tempfile && mv -- tempfile vsftpd.conf
-	sed 's/local_enable=YES/local_enable=NO/g' vsftpd.conf > tempfile && mv -- tempfile vsftpd.conf
-	#vsftpdanon
-	pw user add -n ftp -c "FTP User" -m -s /sbin/nologin -w none
-	chmod 755 /Programs/${PROGDIR}/anon_ftp
-	cd /Programs/${PROGDIR}/anon_ftp
-	mkdir /Programs/${PROGDIR}/anon_ftp/Uploads
-	mkdir /Programs/${PROGDIR}/anon_ftp/Downloads
-	chmod 777 /Programs/${PROGDIR}/anon_ftp/Uploads
-	chmod 755 /Programs/${PROGDIR}/anon_ftp/Downloads
-	touch Success
+	if [ "$USERS" != "b" ] 
+	then
+		sed 's/anonymous_enable=NO/anonymous_enable=YES/g' /Programs/${PROGDIR}/vsftpd.conf > tempfile && mv -- tempfile /Programs/${PROGDIR}/vsftpd.conf
+		#vsftpdanon
+		pw user add -n ftp -c "FTP User" -m -s /sbin/nologin -w none
+		chmod 755 /Programs/${PROGDIR}/anon_ftp
+		cd /Programs/${PROGDIR}/anon_ftp
+		mkdir /Programs/${PROGDIR}/anon_ftp/Uploads
+		mkdir /Programs/${PROGDIR}/anon_ftp/Downloads
+		chmod 777 /Programs/${PROGDIR}/anon_ftp/Uploads
+		chmod 755 /Programs/${PROGDIR}/anon_ftp/Downloads
+		mv /Programs/${PROGDIR}/anon_ftp /usr/home
+		kdialog --title "vsftpd Server" --msgbox "anonymous folder is in /usr/home/anon_ftp"
+		touch Success
 	fi
-	if [ "$USERS" = "b" ] 
+	if [ "$USERS" != "a" ] 
 	then 	
-	sed 's/anonymous_enable=YES/anonymous_enable=NO/g' vsftpd.conf > tempfile && mv -- tempfile vsftpd.conf
-	sed 's/local_enable=NO/local_enable=YES/g' vsftpd.conf > tempfile && mv -- tempfile vsftpd.conf
+		sed 's/local_enable=NO/local_enable=YES/g' /Programs/${PROGDIR}/vsftpd.conf > tempfile && mv -- tempfile /Programs/${PROGDIR}/vsftpd.conf
 	fi
-	if [ "$USERS" = "c" ] 
-	then 	
-	sed 's/anonymous_enable=NO/anonymous_enable=YES/g' vsftpd.conf > tempfile && mv -- tempfile vsftpd.conf
-	sed 's/local_enable=NO/local_enable=YES/g' vsftpd.conf > tempfile && mv -- tempfile vsftpd.conf
-	#vsftpdanon
-	pw user add -n ftp -c "FTP User" -m -s /sbin/nologin -w none
-	chmod 755 /Programs/${PROGDIR}/anon_ftp
-	cd /Programs/${PROGDIR}/anon_ftp
-	mkdir /Programs/${PROGDIR}/anon_ftp/Uploads
-	mkdir /Programs/${PROGDIR}/anon_ftp/Downloads
-	chmod 777 /Programs/${PROGDIR}/anon_ftp/Uploads
-	chmod 755 /Programs/${PROGDIR}/anon_ftp/Downloads
-	touch Success
-	fi
 else 
-kdialog --title "vsftpd Server" --msgbox "No User specified. You will need to modify the vsftpd.conf"
-fi 
+	kdialog --title "vsftpd Server" --msgbox "No User specified. You will need to modify the vsftpd.conf"
+fi
+kdialog --title "vsftpd Server" --msgbox "You can start/stop vsFTPd via the \"Services Manager\""


Property changes on: pbibuild/modules/vsftpd/overlay-dir/vsftpd
___________________________________________________________________
Added: svn:executable
   + *

Modified: pbibuild/modules/vsftpd/overlay-dir/vsftpd.conf
===================================================================
--- pbibuild/modules/vsftpd/overlay-dir/vsftpd.conf	2008-12-02 01:52:01 UTC (rev 3021)
+++ pbibuild/modules/vsftpd/overlay-dir/vsftpd.conf	2008-12-02 04:38:41 UTC (rev 3022)
@@ -11,7 +11,7 @@
 listen=YES
 
 # Allow anonymous FTP? (Beware - allowed by default if you comment this out).
-anonymous_enable=YES
+anonymous_enable=NO
 ftp_username=ftp
 no_anon_password=YES
 anon_root=/Programs/CHANGEME/anon_ftp
@@ -86,8 +86,8 @@
 #ascii_download_enable=YES
 #
 # You may fully customise the login banner string:
-banner_file=/Programs/CHANGEME/anon_ftp/FTPServer
-#ftpd_banner=Welcome to this FTP Server running under PC-BSD OS.
+#banner_file=/Programs/CHANGEME/anon_ftp/FTPServer
+ftpd_banner=Welcome to this FTP Server running under PC-BSD OS.
 #
 # You may specify a file of disallowed anonymous e-mail addresses. Apparently
 # useful for combatting certain DoS attacks.



More information about the Commits mailing list