Commits

Hojin Choi  committed ae61c10

Fix configuration creating message
Support curl for downloading vmlinuz, initrd

  • Participants
  • Parent commits 19cddbd

Comments (0)

Files changed (2)

 			c.write( "[TFTPD]\n" )
 			c.write( "TFTPROOT=./tftproot\n" )
 			c.close()
-			print "File %s created for configuration"
+			print "File %s created for configuration" % config_filename
+			print "Modify configuration for your environment"
 		except:
 			print "File creation failed: %s" % config_filename
 			sys.exit(1)

File get_centos_pxeinstall.sh

 	ARCH=x86_64
 fi
 
-wget http://ftp.daum.net/centos/$VERSION/os/$ARCH/images/pxeboot/vmlinuz -O tftproot/vmlinuz
-wget http://ftp.daum.net/centos/$VERSION/os/$ARCH/images/pxeboot/initrd.img -O tftproot/initrd.img
+if which -s wget; then
+	wget http://ftp.daum.net/centos/$VERSION/os/$ARCH/images/pxeboot/vmlinuz -O tftproot/vmlinuz
+	wget http://ftp.daum.net/centos/$VERSION/os/$ARCH/images/pxeboot/initrd.img -O tftproot/initrd.img
+elif which -s curl; then
+	curl http://ftp.daum.net/centos/$VERSION/os/$ARCH/images/pxeboot/vmlinuz -o tftproot/vmlinuz
+	curl http://ftp.daum.net/centos/$VERSION/os/$ARCH/images/pxeboot/initrd.img -o tftproot/initrd.img
+else
+	echo "No wget or curl found."
+fi