Busy-box udhcpc with option URL (option 114) patch
06/05/2014, 23:29 - Open Source
Here is my patch to busy box-1.21.1 udhcpc to get the DHCP option 114 from DHCP server.


diff -Naur networking/udhcp/common.c networking/udhcp.new/common.c
--- networking/udhcp/common.c 2013-06-29 22:58:06.000000000 +0800
+++ networking/udhcp.new/common.c 2014-06-04 16:37:41.942075154 +0800
@@ -53,6 +53,7 @@
{ OPTION_STRING , 0x43 }, /* DHCP_BOOT_FILE */
//TODO: not a string, but a set of LASCII strings:
// { OPTION_STRING , 0x4D }, /* DHCP_USER_CLASS */
+ { OPTION_URL_STRING | OPTION_REQ , 0x72 }, /* DHCP_URL ( option 114 ) */
#if ENABLE_FEATURE_UDHCP_RFC3397
{ OPTION_DNS_STRING | OPTION_LIST , 0x77 }, /* DHCP_DOMAIN_SEARCH */
{ OPTION_SIP_SERVERS , 0x78 }, /* DHCP_SIP_SERVERS */
@@ -117,6 +118,7 @@
"tftp" "\0" /* DHCP_TFTP_SERVER_NAME */
"bootfile" "\0" /* DHCP_BOOT_FILE */
// "userclass" "\0" /* DHCP_USER_CLASS */
+ "url" "\0" /* DHCP_URL (option 114) */
#if ENABLE_FEATURE_UDHCP_RFC3397
"search" "\0" /* DHCP_DOMAIN_SEARCH */
// doesn't work in udhcpd.conf since OPTION_SIP_SERVERS
@@ -147,6 +149,7 @@
// [OPTION_BOOLEAN] = 1,
[OPTION_STRING] = 1, /* ignored by udhcp_str2optset */
[OPTION_STRING_HOST] = 1, /* ignored by udhcp_str2optset */
+ [OPTION_URL_STRING] = 1,
#if ENABLE_FEATURE_UDHCP_RFC3397
[OPTION_DNS_STRING] = 1, /* ignored by both udhcp_str2optset and xmalloc_optname_optval */
[OPTION_SIP_SERVERS] = 1,
diff -Naur networking/udhcp/common.h networking/udhcp.new/common.h
--- networking/udhcp/common.h 2013-05-12 07:30:44.000000000 +0800
+++ networking/udhcp.new/common.h 2014-06-04 16:37:41.942075154 +0800
@@ -92,6 +92,7 @@
OPTION_BIN,
OPTION_STATIC_ROUTES,
OPTION_6RD,
+ OPTION_URL_STRING,
#if ENABLE_FEATURE_UDHCP_RFC3397
OPTION_DNS_STRING, /* RFC1035 compressed domain name list */
OPTION_SIP_SERVERS,
@@ -146,6 +147,7 @@
//#define DHCP_BOOT_FILE 0x43 /* same as 'file' field */
//#define DHCP_USER_CLASS 0x4d /* RFC 3004. set of LASCII strings. "I am a printer" etc */
#define DHCP_FQDN 0x51 /* client asks to update DNS to map its FQDN to its new IP */
+#define DHCP_URL_STRING 0x72 /* option 114 */
//#define DHCP_DOMAIN_SEARCH 0x77 /* RFC 3397. set of ASCIZ string, DNS-style compressed */
//#define DHCP_SIP_SERVERS 0x78 /* RFC 3361. flag byte, then: 0: domain names, 1: IP addrs */
//#define DHCP_STATIC_ROUTES 0x79 /* RFC 3442. (mask,ip,router) tuples */
diff -Naur networking/udhcp/dhcpc.c networking/udhcp.new/dhcpc.c
--- networking/udhcp/dhcpc.c 2013-05-12 07:30:44.000000000 +0800
+++ networking/udhcp.new/dhcpc.c 2014-06-04 16:37:41.942075154 +0800
@@ -102,6 +102,7 @@
[OPTION_6RD ] = sizeof("32 128 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 255.255.255.255 "),
[OPTION_STRING ] = 1,
[OPTION_STRING_HOST ] = 1,
+ [OPTION_URL_STRING ] = 1,
#if ENABLE_FEATURE_UDHCP_RFC3397
[OPTION_DNS_STRING ] = 1, /* unused */
/* Hmmm, this severely overestimates size if SIP_SERVERS option
@@ -251,6 +252,10 @@
if (type == OPTION_STRING_HOST && !good_hostname(dest))
safe_strncpy(dest, "bad", len);
return ret;
+ case OPTION_URL_STRING:
+ memcpy(dest, option, len);
+ dest[len] = '\0';
+ return ret;
case OPTION_STATIC_ROUTES: {
/* Option binary format:
* mask [one byte, 0..32]


After patch and compile the busy box, now the udhcpc default send out URL request, and expect the DHCP server will response URL back.

The ISC-DHCP server config also need to add in dhcpd.conf :

options default-utl "http://this.is.a.test/test-path";


If do not like the busy box udhcpc and prefer ISC-DHCP client then also need add in dhclient.conf, because the DHCP server must receive the URL request the response back to clients:

request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, domain-search, host-name,
netbios-name-servers, betbios-scope, interface-mtu,
rfx3442-classless-static-routes, ntp-servers,
default-url;


發表回應 發表回應 ( 1674預覽 )   |  [ 0 引用 ]   |  permalink   |   ( 3.1 / 613 )

OS X 10.9.2
02/26/2014, 03:30 - Apple

發表回應 發表回應 ( 505預覽 )   |  [ 0 引用 ]   |  permalink   |   ( 2.5 / 710 )

被黑了
02/06/2014, 13:02 - 生活
剛上來一看,首頁被貼了一張MMA黑客的標記。不過說說實在的Hack這個實在是沒什麼好高興的。因為用是舊的而且是用PHP寫的blog系統。而且很久沒人管了(沒時間),所以呢...回家再看看有什麼被黑了吧。
發表回應 發表回應 ( 1061預覽 )   |  [ 0 引用 ]   |  permalink   |   ( 3 / 637 )

上班跑去坐鎮黨辦公室?
09/11/2013, 14:27 - 今天
經常看到電視新聞報導,總統、副總統、行政院長、各部會官員,在國民黨中常會開會、報告、評論時政。高官們身兼數職,這對“精英“們並不造成問題,但辦理黨務不算是公務,不是公務就是私事。那麼公務員領人民的稅金給付的薪水,在上班時間跑去辦理個人私事,應該要請假吧,請假若是十分鐘,二十分鐘也就算了,只是個人開小差,是個人道德問題,但若是半天,或一天以上呢?也應該扣薪才合理吧(不要說將公事拿到黨辦公室處理,那正好坐實了黨國不分,會有洩露國家機密的問題)。那麼請問馬英九總統、吳敦義副總統、行政院院長江宜樺、以及各部會首長、官員們,有請假嗎?有扣薪嗎?若沒有的話,這就算不是貪污,也是有嚴重怠惰的問題吧。辦黨務可以在假日或晚上下班後吧。
發表回應 發表回應 ( 617預覽 )   |  [ 0 引用 ]   |  permalink   |   ( 2.9 / 808 )

Backup gmail mail with fetch mail
07/24/2013, 14:57 - Network
.fetchmailrc


poll pop.gmail.com with pro to pop3 and options no dns
user "user@gmail.com" there with password "pass1234" is "username" here options ssl


fetchmail -kv

Do not forget enable the gmail pop service.
發表回應 發表回應 ( 1289預覽 )   |  [ 0 引用 ]   |  permalink   |   ( 3 / 733 )

SDN
07/04/2013, 10:47 - Network
SDN要求的功能90%都已經有Standards可以做到了,
除了要用外部controller之外,
不過用了外部Controller,會有to controller bandwidth問題,
也會有performance issue,還有security(中間人攻擊...)的問題。
不難保和SNMP一樣,每家廠商都有支援,但NMS管理量大時,
問題層出不窮。

要改變封包進行的路徑,而不被原本的forwarding table影響,
可以將封包改用 MPLS 並作 traffic engineering,
也可以用 IEEE802.1AD VLAN QinQ或再進一步到IEEE 802.1AH PBB。
也可以兩者或三者同時配合。

Cisco的架構可以簡單的修改就支援OpenFlow類似的要求,
因為Cisco的軟體架構,原本就要求可以經由軟體設定,改變forwarding的方式。
因為不管硬體使用哪一種chip,Cisco都會經由FPGA或軟體作為軟硬體的bridge,
將計算好的routing table或MAC forwarding table,變成switching chip看得懂的表,download到chip內,
只要軟體層的table不變,下層就可以更快速度工作。讓原本要到軟體層查forwarding table ( routing table/MAC forwarding table/IP/ARP/port forwarding ... )都可以直接在最下層直接工作,
以使得軟體層有一致的工作方式。 (CEF switching)

不過單以提供一個標準的控制方式而言是好事,可以簡化設定,也可以大量自動設定網路,不過前提還是一樣,
已經有SNMP了,量太大時還是一樣會有performance的問題。
若是使用多個controller又會有同步的問題。
發表回應 發表回應 ( 1035預覽 )   |  [ 0 引用 ]   |  permalink   |   ( 3 / 544 )

更新至 Mac OS X 10.8.4
06/06/2013, 22:40 - 今天
在更新OS X 10.8.4前先用Yasu整理硬碟。結果發現MacBook Pro開了兩次都開不起來,想按Command-Option-P-R,結果按到了Command-R就跑出來一個類似開機畫面,先選語言,再來就是可以對硬碟重新安裝、將資料從時光機倒回或硬碟維修,應該是從Download下來的OS X image開機進入維修吧,這樣子以前留的光碟和USB或者是Firewire Target Disk Mode都用不到了。

Apple開機時可以用的按鍵



發表回應 發表回應 ( 492預覽 )   |  [ 0 引用 ]   |  permalink   |   ( 3 / 693 )

被攻擊中
05/22/2013, 22:25 - Network
被攻擊中...


May 19 07:28:25 linux sshd[16495]: refused connect from 190.146.231.34 (190.146.231.34)
May 19 11:20:29 linux sshd[18319]: refused connect from 202.112.112.236 (202.112.112.236)
May 19 14:22:05 linux sshd[18357]: refused connect from 213.108.216.41 (213.108.216.41)
May 20 00:27:10 linux sshd[2063]: refused connect from 202.112.112.236 (202.112.112.236)
May 20 01:04:49 linux sshd[2078]: refused connect from 114.66.192.74 (114.66.192.74)
May 20 01:34:22 linux sshd[2088]: refused connect from 180.210.243.138 (180.210.243.138)
May 20 02:21:47 linux sshd[2097]: refused connect from 125.210.243.249 (125.210.243.249)
May 20 04:53:38 linux sshd[2328]: refused connect from 103.22.182.157 (103.22.182.157)
May 20 06:28:57 linux sshd[2380]: refused connect from 184.107.159.106 (184.107.159.106)
May 20 10:12:51 linux sshd[2474]: refused connect from 217.220.105.11 (217.220.105.11)
May 20 10:17:54 linux sshd[2475]: refused connect from 217.220.105.11 (217.220.105.11)
May 20 12:55:11 linux sshd[2556]: refused connect from 59.151.5.236 (59.151.5.236)
May 20 12:55:49 linux sshd[2557]: refused connect from 118.186.211.46 (118.186.211.46)
May 20 13:55:08 linux sshd[2572]: refused connect from 180.210.243.138 (180.210.243.138)
May 20 16:06:38 linux sshd[2616]: refused connect from 109.73.74.184 (109.73.74.184)
May 20 18:44:44 linux sshd[2714]: refused connect from 202.112.112.236 (202.112.112.236)
May 20 22:58:47 linux sshd[2819]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 22:58:52 linux sshd[2820]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 22:58:57 linux sshd[2821]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 22:59:03 linux sshd[2822]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 22:59:08 linux sshd[2823]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 22:59:13 linux sshd[2824]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 22:59:18 linux sshd[2825]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 22:59:23 linux sshd[2826]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 22:59:28 linux sshd[2827]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 22:59:33 linux sshd[2828]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 22:59:38 linux sshd[2829]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 22:59:44 linux sshd[2830]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 22:59:49 linux sshd[2831]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 22:59:54 linux sshd[2832]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 22:59:59 linux sshd[2833]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:00:04 linux sshd[2835]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:00:09 linux sshd[2836]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:00:14 linux sshd[2837]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:00:19 linux sshd[2838]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:00:25 linux sshd[2839]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:00:30 linux sshd[2840]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:00:35 linux sshd[2841]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:00:40 linux sshd[2842]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:00:45 linux sshd[2843]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:00:50 linux sshd[2844]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:00:55 linux sshd[2845]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:01:00 linux sshd[2846]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:01:06 linux sshd[2847]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:01:11 linux sshd[2848]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:01:16 linux sshd[2849]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:01:21 linux sshd[2850]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:01:26 linux sshd[2851]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:01:31 linux sshd[2852]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:01:36 linux sshd[2853]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:01:41 linux sshd[2854]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:01:47 linux sshd[2855]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:01:52 linux sshd[2856]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:01:57 linux sshd[2857]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:02:02 linux sshd[2858]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:02:07 linux sshd[2859]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:02:12 linux sshd[2860]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:02:17 linux sshd[2861]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:02:22 linux sshd[2862]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:02:27 linux sshd[2863]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:02:33 linux sshd[2864]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:02:38 linux sshd[2865]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:02:43 linux sshd[2866]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:02:48 linux sshd[2867]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:02:53 linux sshd[2868]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:02:58 linux sshd[2869]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:03:03 linux sshd[2870]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:03:08 linux sshd[2871]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:03:14 linux sshd[2872]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:03:19 linux sshd[2873]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:03:24 linux sshd[2874]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:03:29 linux sshd[2875]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:03:34 linux sshd[2876]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:03:39 linux sshd[2877]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:03:44 linux sshd[2878]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:03:49 linux sshd[2879]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:03:55 linux sshd[2880]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:04:00 linux sshd[2881]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:04:05 linux sshd[2882]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:04:10 linux sshd[2883]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:04:15 linux sshd[2884]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:04:20 linux sshd[2885]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:04:25 linux sshd[2886]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:04:30 linux sshd[2887]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:04:36 linux sshd[2888]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:04:41 linux sshd[2889]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:04:46 linux sshd[2890]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:04:51 linux sshd[2891]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:04:56 linux sshd[2892]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:05:01 linux sshd[2893]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:05:06 linux sshd[2894]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:05:11 linux sshd[2895]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:05:16 linux sshd[2896]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:05:22 linux sshd[2897]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:05:27 linux sshd[2898]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:05:32 linux sshd[2899]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:05:37 linux sshd[2900]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:05:42 linux sshd[2901]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:05:47 linux sshd[2902]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:05:52 linux sshd[2903]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:05:57 linux sshd[2904]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:06:03 linux sshd[2905]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:06:08 linux sshd[2906]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:06:13 linux sshd[2907]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:06:18 linux sshd[2908]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:06:23 linux sshd[2909]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:06:28 linux sshd[2910]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:06:33 linux sshd[2911]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:06:39 linux sshd[2912]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:06:44 linux sshd[2913]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:06:49 linux sshd[2914]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:06:54 linux sshd[2915]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:06:59 linux sshd[2916]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:07:04 linux sshd[2917]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:07:09 linux sshd[2918]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:07:14 linux sshd[2919]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:07:20 linux sshd[2920]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:07:25 linux sshd[2921]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:07:30 linux sshd[2922]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:07:35 linux sshd[2923]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:07:40 linux sshd[2924]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:07:45 linux sshd[2925]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:07:50 linux sshd[2926]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:07:55 linux sshd[2927]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:08:01 linux sshd[2928]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:08:06 linux sshd[2929]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:08:11 linux sshd[2930]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:08:16 linux sshd[2931]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:08:21 linux sshd[2932]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:08:26 linux sshd[2933]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:08:31 linux sshd[2934]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:08:36 linux sshd[2935]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:08:42 linux sshd[2936]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:08:47 linux sshd[2937]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:08:52 linux sshd[2938]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:08:57 linux sshd[2939]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:09:02 linux sshd[2940]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:09:07 linux sshd[2941]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:09:12 linux sshd[2942]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:09:17 linux sshd[2943]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:09:22 linux sshd[2944]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:09:28 linux sshd[2945]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:09:33 linux sshd[2946]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:09:38 linux sshd[2947]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:09:43 linux sshd[2948]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:09:48 linux sshd[2949]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:09:53 linux sshd[2950]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:09:58 linux sshd[2951]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:10:03 linux sshd[2952]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:10:09 linux sshd[2953]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:10:14 linux sshd[2954]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:10:19 linux sshd[2955]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:10:24 linux sshd[2956]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:10:29 linux sshd[2957]: refused connect from 113.107.101.234 (113.107.101.234)
May 20 23:10:34 linux sshd[2958]: refused connect from 113.107.101.234 (113.107.101.234)
May 21 02:50:36 linux sshd[3008]: refused connect from 113.6.247.171 (113.6.247.171)
May 21 03:07:17 linux sshd[3010]: refused connect from 200.27.148.60 (200.27.148.60)
May 21 03:12:28 linux sshd[3011]: refused connect from 200.27.148.60 (200.27.148.60)
May 21 06:15:59 linux sshd[5003]: refused connect from 59.151.5.236 (59.151.5.236)
May 21 16:12:19 linux sshd[5268]: refused connect from 199.91.135.140 (199.91.135.140)
May 21 21:04:19 linux sshd[5393]: refused connect from 64.206.128.5 (64.206.128.5)
May 22 01:33:54 linux sshd[5483]: refused connect from 113.107.47.41 (113.107.47.41)
May 22 01:53:48 linux sshd[5493]: refused connect from 80.149.206.2 (80.149.206.2)
May 22 04:53:20 linux sshd[5711]: refused connect from 124.217.239.87 (124.217.239.87)
May 22 05:07:52 linux sshd[5712]: refused connect from 124.217.239.87 (124.217.239.87)
May 22 15:16:21 linux sshd[6070]: refused connect from 122.154.157.104 (122.154.157.104)
May 22 20:36:27 linux sshd[6208]: refused connect from 218.56.48.43 (218.56.48.43)
May 22 21:11:58 linux sshd[6234]: refused connect from 91.207.8.126 (91.207.8.126)
May 22 22:08:26 linux sshd[6252]: refused connect from 221.120.239.155 (221.120.239.155)

發表回應 發表回應 ( 1020預覽 )   |  [ 0 引用 ]   |  permalink   |   ( 3 / 715 )

Ubuntu Kickstart file
12/13/2012, 17:47 - Open Source
這是給Ubuntu Linux網路安裝用的kickstart檔案,說實在的,
這Preseed很多東西都不是在文件上寫得很清楚,不過反正現在可以用了。
唉~Ubuntu Linux很喜歡將傳統改掉啊,這樣子一搞,讓原本很熟Linux/UNIX的人,也很頭疼啊。
這個script的後半會修改原本系統的設定,讓Ubuntu Linux box可以不用顯示卡也可以開機,
將顯示的案變成原來的80x25大小,以及設定風扇和CPUFreq根據IT8712的偵測到的温度連動等等。
debugCard是某種功能的東西,而nvram.backup是主機板BIOS的設定備份資料。


#Ubuntu 11.04#
#platform=AMD64 or Intel EM64T
#
platform=AMD64
install
text
#url --url http://ftp.isu.edu.tw/pub/Linux/Ubuntu/ubuntu
url --url ftp://10.7.0.254/pub/Ubuntu/11.04_AMD64_Server
#
preseed --owner d-i debian-installer/locale string en_US.UTF-8
preseed --owner d-i debian-installer/splash boolean false
preseed --owner d-i debian-installer/allow_unauthenticated boolean true
preseed --owner d-i debian-installer/exit/halt boolean false
preseed --owner d-i debian-installer/exit/poweroff boolean true
preseed --owner d-i debian-installer/add-kernel-opts string \
"console=ttyS0,9600n8 console=tty0 hept=force it87.fix_pwm_polarity=1 \
eariltyprintk=ttyS0,9600n8 panic=60 quiet vga=0 nomodeset"
#
preseed --owner d-i console-setup/ask-detect boolean false
preseed --owner d-i console-setup/layoutcode string us
preseed --owner d-i console-setup/variantcode string
preseed --owner d-i keyboard-configuration/layoutcode string us
preseed --owner d-i keyboard-configuration/variantcode string
#
preseed --owner d-i netcfg/choose_interface select auto
preseed --owner d-i netcfg/get_nameservers string
preseed --owner d-i netcfg/get_ipaddress string
preseed --owner d-i netcfg/get_netmask string
preseed --owner d-i netcfg/no_default_route boolean
preseed --owner d-i netcfg/confirm_static boolean false
#
preseed --owner d-i time/zone string Asia/Taipei
preseed --owner d-i clock-setup/ntp boolean true
preseed --owner d-i clock-setup/ntp-server string 10.7.0.254
preseed --owner d-i clock-setup/utc boolean false
#
preseed --owner d-i partman-auto/purge_lvm_from_device boolean true
preseed --owner d-i partman-auto/method string regular
preseed --owner d-i partman-auto/disk string /dev/sda
preseed --owner d-i partman-auto/choose_recipe select atomic
preseed --owner d-i partman/default_filesystem string ext2
preseed --owner d-i partman-lvm/device_remove_lvm boolean true
preseed --owner d-i partman-lvm/confirm boolean true
preseed --owner d-i partman-md/device_remove_md boolean true
preseed --owner d-i partman-md/confirm boolean true
preseed --owner d-i partman/mount_style select traditional
preseed --owner d-i partman/confirm_write_new_label boolean true
preseed --owner d-i partman/confirm_nooverwrite boolean false
preseed --owner d-i partman-partitioning/confirm_write_new_label boolean true
preseed --owner d-i partman/choose_partition select "Finish partitioning and write changes to disk"
preseed --owner d-i partman/confirm boolean true
#
preseed --owner d-i passwd/root-login boolean true
preseed --owner d-i passwd/root-password password admin
preseed --owner d-i passwd/root-password-again passwrd admin
#
preseed --owner d-i passwd/user-fullname string "Admin User"
preseed --owner d-i passwd/username string admin
preseed --owner d-i passwd/user-password password admin
preseed --owner d-i passwd/user-password-again password admin
preseed --owner d-i passwd/user-default-groups string users,sudo,admin,root
preseed --owner d-i passwd/user-uid string 1001
#
preseed --owner d-i user-setup/encrypt-home boolean false
preseed --owner d-i user-setup/allow-password-weak boolean true
#
preseed --owner d-i apt-setup/backports boolean true
preseed --owner d-i apt-setup/multiverse boolean true
preseed --owner d-i apt-setup/partner boolean true
preseed --owner d-i apt-setup/restricted boolean true
preseed --owner d-i apt-setup/universe boolean true
preseed --owner d-i apt-setup/use_mirror boolean true
#
preseed --owner d-i mirror/protocol string http
preseed --owner d-i mirror/country string Taiwan
preseed --owner d-i mirror/hostname string archive.ubuntu.com
preseed --owner d-i mirror/directory string /ubuntu
#
preseed --owner d-i base-installer/kernel/override-image string linux-server
preseed --owner d-i base-installer/install-recommands boolean false
preseed --owner d-i base-installer/kernel/linux/extra-packages string
#
preseed --owner d-i base-config/install-language-support boolean false
#
#preseed --owner d-i archive-copier/desktop-task string ubuntu-standard
preseed --owner d-i archive-copier/ship-task string
#
preseed --owner d-i apt-setup/mirror/error select Retry
preseed --owner d-i debconf debconf/frontend select Noninteractive
#
# For GRUB Lagacy
#preseed --owner d-i grub-installer/grub2_instead_of_grub_legacy boolean false
# For GRUB2
preseed --owner d-i grub-pc/timeout string "60"
preseed --owner d-i grub-installer/only_debian boolean true
preseed --owner d-i grub-installer/with_other_os boolean true
# FOR LILO
#preseed --owner d-i grub-installer/skip boolean true
# FOR GRUB
preseed --owner d-i lilo-installer/skip boolean true
#
preseed --owner d-i finish-install/keep-consoles boolean true
preseed --owner d-i finish-install/reboot_in_progress note
preseed --owner d-i cdrom-detect/eject boolean true
#
preseed --owner d-i pkgsel/upgrade select none
preseed --owner d-i pkgsel/update-polity select unattended-upgeades
preseed --owner d-i pkgsel/install-language-support boolean false
preseed --owner d-i pkgsel/install-recommends boolean true
preseed --owner d-i pkgsel/include string \
ubuntu-minimal,openssh-server,acpid,avahi-daemon,avahi-utils,cpufreqd,cpufrequtils,curl,ethtool,expect, \
fancontrol,lm-sensors,lua5.1,ncftp,snmp,snmpd,traceroute,zip

# Pre-install
##%pre
##/usr/sbin/parted -s /dev/sda mklabel gpt
##%end
#
# Post-install
%post --nochroot
# Remove splashimage settimg in grub boot for no display card installed CentOS
##sed -i '/splashimage/s/^./#&/' /mnt/sysimage/boot/grub/grub.conf
#
# Remove splashsetting in grub boot for no display card installed Ubuntu
# Edit /boot/grub/grub.cfg
sed -i 's/splash//g;/linux_gfx_mode=/s/keep/text/g' /target/etc/grub.d/10_linux
#
sed -i 's/splash//g;/linux_gfx_mode=/s/keep/text/g' /target/boot/grub/grub.cfg
#
# Edit /etc/sudoers file
echo "admin ALL=(ALL:ALL) ALL" >>/target/etc/sudoers
#
# Edit /etc/default/console-setup
sed -i 's/^FONT*/#&/g;/SCREEN/s/^#//g;/SCREEN/s/ //g' /target/etc/default/console-setup
#
cat >/target/etc/fancontrol << EOF
# Confiogure file generated by pwmconfig, changes will be lost
INTERVAL=10
DEVPATH=hwmon0=devices/pci0000:00/0000:00:18.3 hwmon2=devices/platform/it87.656
DEVNAME=hwmon0=k8temp hwmon2=it8712
FCTEMPS=hwmon2/device/pwm3=hwmon0/device/temp1_input \
hwmon2/device/pwm2=hwmon0/device/temp1_input \
hwmon2/device/pwm1=hwmon0/device/temp1_input
FCFANS=hwmon2/device/pwm3= hwmon2/device/pwm2= hwmon2/device/pwm1=
MINTEMP=hwmon2/device/pwm3=20 hwmon2/device/pwm2=20 hwmon2/device/pwm1=20
MAXTEMP=hwmon2/device/pwm3=60 hwmon2/device/pwm2=60 hwmon2/device/pwm1=60
MINSTART=hwmon2/device/pwm3=150 hwmon2/device/pwm2=150 hwmon2/device/pwm1=150
MINSTOP=hwmon2/device/pwm3=0 hwmon2/device/pwm2=0 hwmon2/device/pwm1=0
EOF
#
cat >/target/etc/sensors3.conf << EOF
# libsensors configuration file
# -----------------------------
#
chip "it87-*" "it8712-*" "it8716-*" "it8718-*" "it8720-*"

label in8 "Vbat"
set temp1_type 2
set temp2_type 4
set temp3_type 4

label temp1 "M/B Temp "
label temp2 "CPU1 Temp"
label temp3 "CPU0 Temp"

compute temp1 @-30,@
compute temp2 (@*1.42)-51,(@+51)/1.42
compute temp3 (@*1.42)-51,(@+51)/1.42

chip "k8temp-*"

label temp1 "Core0 Temp"
label temp2 "Core0 Temp"
label temp3 "Core1 Temp"
label temp4 "Core1 Temp"

EOF
#
cat > /target/etc/cpufreqd.conf << EOF
# CPUFREQ.CONF(5) manpage for a complete reference
[General]
pidfile=/var/run/cpufreqd.pid
poll_interval=2
verbosity=4
#enable_remote=1
#remote_group=root
[/General]

[acpi]
acpid_socket=/var/run/acpid.socket
[/acpi]

[sensors_plugin]
sensors_conf=/etc/sensors3.conf
[sensors_plugin]

[Profile]
name=OnDemandHigh
minfreq=50%
maxfreq=100%
policy=ondemand
[/Profile]
#
[Profile]
name=OnDemandLow
minfreq=10%
maxfreq=50%
policy=ondemand
[/Profile]
#
[Profile]
name=PerformanceHigh
minfreq=100%
maxfreq=100%
policy=performance
[/Profile]
#
[Profile]
name=PerformanceLow
minfreq=80%
maxfreq=80%
policy=performance
[/Profile]
#
[Profile]
name=PowersaveHigh
minfreq=60%
maxfreq=60%
policy=powersave
[/Profile]
#
[Profile]
name=PowersaveLow
minfreq=40%
maxfreq=40%
policy=powersave
[/Profile]
#
[Profile]
name=ConservativeHigh
minfreq=33%
maxfreq=100%
policy=conservative
[/Profile]
#
[Profile]
name=ConservativeLow
minfreq=0%
maxfreq=66%
policy=conservative
[/Profile]
#
# Basic states
#
[Rule]
name=AC High Power
ac=on
acpi_temperature=55-85
sensor=temp1:55-85
cpu_interval=ANY:50-100
profile=OnDemandHigh
[/Rule]
#
[Rule]
name=AC Low Power
ac=on
acpi_temperature=0-55
sensor=temp1:0-55
cpu_interval=ALL:0-30
profile=OnDemandLow
[/Rule]
#
[Rule]
name=CPU is Hot
acpi_temperature=75-80
sensor=temp1:75-80
cpu_interval=ANY:90-100
exec_post=/usr/bin/logger -i "System is Hot"
profile=OnDemandHigh
[/Rule]
#
[Rule]
name=CPU is Hot Hot Hot
acpi_temperature=80-90
sensor=temp1:80-90
cpu_interval=ANY:90-100
exec_post=/usr/bin/logger -i -s "System is Hot Hot Hot"
profile=OnDemandLow
[/Rule]
#
[Rule]
name=CPU Over Heat
acpi_temperature=90-110
sensor=temp1:90-110
#cpu_interval=ALL:100-110
exec_post=/sbin/shutdown -h now
profile=OnDemandLow
[/Rule]
#
EOF
#
/usr/bin/wget -c -O /target/usr/local/bin/debugCard ftp://10.7.0.254/pub/debugCard
/usr/bin/wget -c -O /target/etc/nvram.backup ftp://10.7.0.254/pub/nvram.backup
chmod 755 /target/usr/local/bin/debugCard
#
sed -i '/^exit 0/i echo 1 >/proc/sys/net/ipv4/ip_forward' /target/etc/rc.local
sed -i '/^exit 0/i /sbin/modprobe nvram >/dev/null 2>&1' /target/etc/rc.local
sed -i '/^exit 0/i /bin/dd if=/etc/nvram.backup of=/dev/nvram >/dev/null 2>&1' /target/etc/rc.local
sed -i '/^exit 0/i /sbin/rmmod nvram >/dev/null 2>&1' /target/etc/rc.local
sed -i '/^exit 0/i /sbin/modprobe it87' /target/etc/rc.local
sed -i '/^exit 0/i /usr/sbin/fancontrol &' /target/etc/rc.local
sed -i '/^exit 0/i /usr/local/bin/debugCard &' /target/etc/rc.local
sed -i '/^exit 0/i /usr/sbin/ntpdate -s 10.7.0.254 >/dev/null 2>&1' /target/rc.local
# Add WOL enable support
sed -i '/^exit 0/i /sbin/ethtool eth0 -s wol g>/dev/null 2>&1' /target/etc/rc.local
sed -i '/^exit 0/i /sbin/ethtool eth1 -s wol g>/dev/null 2>&1' /target/etc/rc.local
# Add more TX Queue for Ethernets
sed -i '/^exit 0/i /sbin/ifconfig eth0 txqueuelen 5000 >/dev/null 2>&1' /target/etc/rc.local
sed -i '/^exit 0/i /sbin/ifconfig eth1 txqueuelen 5000 >/dev/null 2>&1' /target/etc/rc.local
#

發表回應 發表回應 ( 2984預覽 )   |  [ 0 引用 ]   |  permalink   |   ( 3 / 1016 )

Mac OS X Applications Update
07/26/2012, 10:23 - Apple
今天Apple放了很多更新,算算要Download 4-5GB吧。



發表回應 發表回應 ( 496預覽 )   |  [ 0 引用 ]   |  permalink   |   ( 3 / 1013 )


<<開始 <前一頁 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 下一頁> 最後>>