קוד: |
# ************ # = Tashtit = # ************ echo "Choose Bezeq or HOT 1 for Bezeq 2 for HOT." echo "1. Bezeq" echo "2. HOT" Tashtit="HOT" echo "[Default value is $Tashtit...]" read Tashtit if [ "$Tashtit" == "1" ] then Tashtit="Bezeq" echo "Chosen value is: $Tashtit" else Tashtit="HOT" echo "Chosen value is: $Tashtit" fi # so i know the tashtit now :-) # ************************************* # === whichISP === need ISPinfo file # ************************************* echo echo "Choose the number which assosiated with your ISP." echo "[ 1 by default ...]" more +2 ISPinfo | awk {'print $1 "\t" $2'} read whichISP # input checking if [ -n "$whichISP" ] then echo "You insert $whichISP" echo "Input checking..." whichISP=$(echo $whichISP | grep '^[0-9]\{1,2\}$' | grep '^[1-9]') if [ -n "$whichISP" ] then maxISP=$(cat ISPinfo | tail -n 1 | awk {'print $1'}) if [[ "$maxISP" < "$whichISP" ]] then echo "Wrong value - greater then $maxISP. Use default" whichISP="1" more +2 ISPinfo | head -n $whichISP | tail -n 1 | awk {'print $1 "\t" $2'} else echo "You choose:" more +2 ISPinfo | head -n $whichISP | tail -n 1 | awk {'print $1 "\t" $2'} fi else echo "You insert Incorrect value. Use default value" whichISP="1" more +2 ISPinfo | head -n $whichISP | tail -n 1 | awk {'print $1 "\t" $2'} fi else echo "No input. Use default:" whichISP="1" more +2 ISPinfo | head -n $whichISP | tail -n 1 | awk {'print $1 "\t" $2'} fi # ******************************** # == Username and password part == # ******************************** echo "Type connection Name" echo "Default value is your chossen ISP name" read connectionName if [ -z $connectionName ]; then connectionName=$(more +2 ISPinfo | head -n $whichISP | tail -n 1 | awk {'print $2'}) fi echo "Type your username" read myUsername echo "Type your password" read myPassword echo echo "Connection name is: $connectionName * Username is: $myUsername * password is: $myPassword" #need to check username if it is with @ style or else #check if username already exist in papsecrets echo "\"$myUsername\" * \"$myPassword\" # $connectionName" #>> /etc/ppp/pap-secrets echo "\"$myUsername\" * \"$myPassword\" # $connectionName" #>> /etc/ppp/chap-secrets # ************************************************************** # == create the connection script # ********************************** # need net-dialup/rp-pppoe if [ "$Tashtit" == "Bezeq" ] then PPPfile=$(echo "$connectionName.pppoe.conf") echo "Configuration file for this connection: $PPPfile" cp pppoe.conf /etc/ppp/$PPPfile #daroosh shipuz kal else myHost=$(more +2 ISPinfo | head -n $whichISP | tail -n 1 | awk {'print $3'}) PPPconfile=$(echo $HOME/connect.$connectionName) echo "myUGIP=\$(route | grep UG | awk {'print \$2'})" > $PPPconfile echo "route add -host $myHost gw \$myUGIP" >> $PPPconfile echo "myHostIP=\$(route | grep UGH | awk {'print \$1'})" >> $PPPconfile echo "pptp \$myHostIP --debug user $myUsername mru 1500 mtu 1500 defaultroute usepeerdns" >> $PPPconfile echo "myPPTPIP=\$(route | grep UH | awk {'print \$1'})" >> $PPPconfile echo "route add default gw \$myPPTPIP" >> $PPPconfile echo "route del default gw \$myUGIP" >> $PPPconfile echo "To connect run as root $PPPconfile" chmod 755 $PPPconfile fi |
קוד: |
index ISP_name VPN_PPTP VPN_L2TP 2ADSL_User_extentions 1 netvision cable.netvision.net.il cable.netvision.net.il @INetvision @017 2 Internet_Zahav pns.inter.net.il lns.inter.net.il @IInzahav @015 3 Bezeq_BenLeumi matav.bezeqint.net matav.bezeqint @IBezint @014 4 Barak013 pns.barak.net.il cable.barak.net.il @IBarak none 5 kavey_zahav012 cablepns.012.net.il cablelns.012.net.il @IKzahav none 6 actcom pns4.actcom.net.il lns4.actcom.net.il @IActcom none |
DoK לא מחובר : |
יש כבר לפחות שלושה כאלו
זה של מרסלו cablecon iwiz ההודעה של איליה בדיון http://whatsup.org.il/forum/38935 מבהירה היטב את הבעיה של כל השלושה - הם לא נגישים ללא התחברות לספק. לעניות דעתי הפתרונות הטובים ביותר כרגע הם מדריכים ויש כמה כאלו, הן כלליים והן להפצות ספציפיות. לפחות אחד מהמדריכים (בגרסה שאינה מתוחזקת עוד) מקושר מהפורום שאת מנהלת. |
ציטוט: |
מערכת הפעלה שמשתמשים מתחילים צריכים לקרוא מאמרים ולהיות ברמה של מפתחים כדי לעבוד איתה היא לא בדיוק ידידותית אלה תישאר לנצח גימיק של כמה חברה עם סריטה במקום הנכון |
כרמית לוי : |
מערכת הפעלה שמשתמשים מתחילים צריכים לקרוא מאמרים ולהיות ברמה של מפתחים כדי לעבוד איתה היא לא בדיוק ידידותית אלא תישאר לנצח גימיק של כמה חברה עם שריטה במקום הנכון. |
ציטוט: |
- מבחינה קהילתית, אין טעם להפוך ל-"ידידותיים במיוחד" בעיקר כדי למשוך הדיוטות, שכן תרומתם של אלו בחזרה לקהילה הינה לרוב נמוכה במיוחד, ולעיתים אף שלילית... |
liorwohl : |
רעיון מצויין לפי דעתי.
לבן דוד שלי התקנתי אובונטו על המחשב והוא כמעט ולא משתמש בו רק כי לא הצלחנו לסדר שהאינטרנט יעבוד. וזה לא שהוא לא רוצה.. הוא ביקש.. לי למזלי יש ראווטר. אז חייב להיות איזשהו פתרון לבעייה, וככה אני חושב שהפתרון הזה צריך להיות: צריך שהסקריפט יהיה קובץ אחד, שלא צריך שום התקנה או משהו "מסובך", שכל משתמש לינוקס ישראלי שאין לו ראווטר פשוט יקח וישים אצלו על הדסקטופ, שילחצו על האייקון שלו יפתח ממשק גרפי פשוט שכתוב בו להכניס את הפרטי התחברות, ואולי יהיה גם קצת מידע על הספקית, המודם וכל זה. והמשתמש פשוט יכניס את הפרטים, ילחץ "התחבר" וזהו, הוא יהיה מחובר.. ואני מוכן "להמיר" את הידע שלי בתכנות לאינטרנט כדי ללמוד איך להכין ממשק פשוט כדה (או שאני יבנה אותו בxul וזהו אבל אז זה יהיה 2 קבצים) רק צריך את הסקריפט שמאחורה. |
JuNKiE : | ||
גישה זו היא בעייתית מכמה בחינות : - אין אפשרות ליצור משהו שהוא "חסין הדיוטות", וגם אם קיימת אפשרות להתקרב לכך מאד, אף אחד חוץ מאותם הדיוטות כנראה לא יהיה מעוניין להשתמש בתוצר הסופי. - הדיוטות נוהגים להיעזר במומחים לצורך פתרון "קשיים" (נכון למדיי גם במעה"פ אחרות - המתיימרות להיות "ידידיותיות"), ולמעשה בעיקר לשם כך קיים תיעוד כתוב ומפורט, וכמו כן קיימות גם אפשרויות תמיכה אחרות. - מפתחי ה-F/OSS פועלים עדיין בחלקם הגדול להנאתם האישית וללא תמורה (כך שאין כל הצדקה מוסרית לדרוש מאלו דבר שבו אינם חפצים). - מבחינה קהילתית, אין טעם להפוך ל-"ידידותיים במיוחד" בעיקר כדי למשוך הדיוטות, שכן תרומתם של אלו בחזרה לקהילה הינה לרוב נמוכה במיוחד, ולעיתים אף שלילית... - אין חובה המוטלת על משתמש להשתמש דווקא ב-F/OSS בכלל או בתוכנות מסויימות בפרט (לכל דבר יש יתרונות וחסרונות, ואלו עשויים להיות יחסיים למדיי...). --- לסיכום, ולדעתי, תוכנה אכן צריכה להיות "ידידותית למשתמש הסביר", אך בהחלט לא "חסינת הדיוטות" או "ידידותית לכולם" ! |
JuNKiE : |
א. רמת הידע והכישורים של "המשתמש הסביר" היא משהו שאמור להישאר קבוע, ולהיות בהתאם לסוג התוכנה. למשל, "המשתמש הסביר" לעניין משחקים, יהיה ברמה נמוכה יותר משל זה לעניין יישומים משרדיים.
ב. לינוקס היא לא "מוצר". לינוקס היא תוכנה חופשית, ליבת מעה"פ - וסביבה אוסף של תוכנות, שרובן מפיתוח קהילתי, לפי דגם הבזאר (ממאמרו של אריק ס. ריימונד). ג. ומדוע את טוענת כי "דרכתי" על "תינוקות" מהקהילה ? ובכלל, מי הם אותם "תינוקות" של הקהילה שאליהם את מתייחסת ? נראה שהרבה יותר קל ונוח להטיח האשמות חסרות בסיס, ורפש, בייחוד תחת כסות האנונימיות של האינטרנט... מאשר לבסס את הטענות בעלמא, על עובדות של ממש ! |
JuNKiE : |
א. רמת הידע והכישורים של "המשתמש הסביר" היא משהו שאמור להישאר קבוע, ולהיות בהתאם לסוג התוכנה. למשל, "המשתמש הסביר" לעניין משחקים, יהיה ברמה נמוכה יותר משל זה לעניין יישומים משרדיים.
ב. לינוקס היא לא "מוצר". לינוקס היא תוכנה חופשית, ליבת מעה"פ - וסביבה אוסף של תוכנות, שרובן מפיתוח קהילתי, לפי דגם הבזאר (ממאמרו של אריק ס. ריימונד). ג. ומדוע את טוענת כי "דרכתי" על "תינוקות" מהקהילה ? ובכלל, מי הם אותם "תינוקות" של הקהילה שאליהם את מתייחסת ? נראה שהרבה יותר קל ונוח להטיח האשמות חסרות בסיס, ורפש, בייחוד תחת כסות האנונימיות של האינטרנט... מאשר לבסס את הטענות בעלמא, על עובדות של ממש ! |
ציטוט: |
לא אמרתי שלינוקס צריכה להיות ידידותית לכולם
היא צריכה להיות ידידותית למשתמש הסביר אני חולקת עליך בעניין הזה משום שלדעתי לינוקס בכלל לא ידידותית למשתמש הסביר היא אפילו לא מספיק ידידותית לטכנאים [כאלה שאמורים להתקין לאנשים שבוחרים בלינוקס כמערכת הפעלה ורוצים שמישהו יתקין להם ויסדר הגדרות של כל מיני תוכנות חופשיות] |
קוד: |
if [ "$Tashtit" == "Bezeq" ]
then if [ -z "$(echo $myUsername | grep @)" ] then echo "You say you are using ADSL Bezeq infrastructure" echo "but you type your username wrong without the \"@\" sign" echo "Please rerun the script with correct username" exit 1 fi fi |
ציטוט: |
צריך אשף התחברות לאינטרנט - הרבה מבקשים |
Anonymous : | ||
מסכים. אבל אני ממש לא מסכים עם הדרך שבחרת - לבנות _עוד_ "אשף". די כבר. אם את כל כך רוצה לעזור, ואינך תאבת אגו, לא יותר טוב _למשתמשים_ (תינוקות לינוקס כהגדרתך) אם תואילי בטובך לתרום את המרץ לשפר את מה שאת חושבת שדורש שיפור באחד מהאשפים הקיימים? האשף cablecon נראה לי בהחלט התחלה טובה. המשתמשים (התינוקות בעיקר) לא צריכים _עוד_ אשף שרק יבלבל אותם יותר ("כן, הורדתי את האשף ועשיתי כך וכך... אה, לא את האשף הזה? את זה? אה, לא את זה? את זה?") אם טובת המשתמש אכן מדריכה אותך - אנא חשבי כמה דקות לפני שאת מגיבה... והמשיכי משם. |
קוד: |
self.execute("/sbin/route add -host " + sel... self.execute("BASH COMMAND") self.execute("BASH COMMAND") etc... |
גונן : |
ניסיתי את הסקריפט, כמו שהוא מופיע פה בפוסט הראשון, ב liveCD של הפצת sabayon linux
(מבוסס ג'נטו) בתשתית כבלים וספק 012 (חיבור רשת כמובן) ועצוב לי לדווח שהסקריפט נשבר מאוד מהר על שגיאת syntax כלשהי... ייתכן שזה נבע מ copy-paste, ואולי פשוט תאימות ל shell בו השתמשתי. לצערי לא זכרתי לשים לב אם אני ב bash או משהו אחר. בכל אופן, מחר אני אנסה את זה שוב עם liveCD של kubuntu ואולי knoppix ונראה מה יהיו התוצאות שם. |
קוד: |
# ************ # = Tashtit = # ************ echo "Choose Bezeq or HOT 1 for Bezeq 2 for HOT." echo "1. Bezeq" echo "2. HOT" Tashtit="HOT" echo "[Default value is $Tashtit...]" read Tashtit if [ "$Tashtit" == "1" ] then Tashtit="Bezeq" echo "Chosen value is: $Tashtit" else Tashtit="HOT" echo "Chosen value is: $Tashtit" fi # so i know the tashtit now :-) # ************************************* # === whichISP === need ISPinfo file === ask if not bezeq # ************************************* if [ "$Tashtit" == "HOT" ] then echo "Choose the number which assosiated with your ISP." echo "[ 1 by default ...]" more +2 ISPinfo | awk {'print $1 "\t" $2'} read whichISP # input checking if [ -n "$whichISP" ] then echo "You insert $whichISP" echo "Input checking..." whichISP=$(echo $whichISP | grep '^[0-9]\{1,2\}$' | grep '^[1-9]') if [ -n "$whichISP" ] then maxISP=$(cat ISPinfo | tail -n 1 | awk {'print $1'}) if [[ "$maxISP" < "$whichISP" ]] then echo "Wrong value - greater then $maxISP. Use default" whichISP="1" more +2 ISPinfo | head -n $whichISP | tail -n 1 | awk {'print $1 "\t" $2'} else echo "You choose:" more +2 ISPinfo | head -n $whichISP | tail -n 1 | awk {'print $1 "\t" $2'} fi else echo "You insert Incorrect value. Use default value" whichISP="1" more +2 ISPinfo | head -n $whichISP | tail -n 1 | awk {'print $1 "\t" $2'} fi else echo "No input. Use default:" whichISP="1" more +2 ISPinfo | head -n $whichISP | tail -n 1 | awk {'print $1 "\t" $2'} fi fi #***************************************************** # ******************************** # == Username and password part == # ******************************** echo "Type connection Name" echo " Default value is your chossen ISP name for cables" echo " or Bezeq if it is" read connectionName if [ -z $connectionName ] then if [ "$Tashtit" == "HOT" ] then connectionName=$(more +2 ISPinfo | head -n $whichISP | tail -n 1 | awk {'print $2'}) else connectionName="Bezeq_Israel" fi fi echo "Type your username" read myUsername # username checking if [ -z "$myUsername" ] then echo "Exit script due to empty username" exit 1 fi if [ "$Tashtit" == "Bezeq" ] then if [ -z "$(echo $myUsername | grep @)" ] then echo "You say you are using ADSL Bezeq infrastructure" echo "but you type your username wrong without the \"@\" sign" echo "Please rerun the script with correct username" exit 1 fi fi echo "Type your password" read myPassword if [ -z "$myPassword" ] then echo "Exit script due to empty password" exit 1 fi echo echo "Connection name is: $connectionName * Username is: $myUsername * password is: $myPassword" #need to check username if it is with @ style or else #check if username already exist in papsecrets echo "\"$myUsername\" * \"$myPassword\" # $connectionName" >> /etc/ppp/pap-secrets echo "\"$myUsername\" * \"$myPassword\" # $connectionName" >> /etc/ppp/chap-secrets # ************************************************************** # == create the connection script # ********************************** # need net-dialup/rp-pppoe if [ "$Tashtit" == "Bezeq" ] then PPPfile=$(echo "$connectionName.pppoe.conf") echo "Configuration file for this connection: $PPPfile" cp pppoe.conf /etc/ppp/$PPPfile #daroosh shipuz kal else myHost=$(more +2 ISPinfo | head -n $whichISP | tail -n 1 | awk {'print $3'}) PPPconfile=$(echo $HOME/connect.$connectionName) cat $HOME/internetconnection/dhcpchecking.file > $PPPconfile echo "myUGIP=\$(route | grep UG | awk {'print \$2'})" >> $PPPconfile echo "route add -host $myHost gw \$myUGIP" >> $PPPconfile echo "myHostIP=\$(route | grep UGH | awk {'print \$1'})" >> $PPPconfile echo "pptp \$myHostIP --debug user $myUsername mru 1500 mtu 1500 defaultroute usepeerdns" >> $PPPconfile echo "myPPTPIP=\$(route | grep UH | awk {'print \$1'})" >> $PPPconfile echo "route add default gw \$myPPTPIP" >> $PPPconfile echo "route del default gw \$myUGIP" >> $PPPconfile echo "To connect run as root $PPPconfile" chmod 755 $PPPconfile fi #*********************************************************************************8 #Best list :-) #1. Best: HOT + terayon + ethernet card eth0 #Development #1. for HOT: wireless network auto configuration #2. for HOT: USB connection example terayon #3. for bezeq: # http://www.bezeq.co.il/Cultures/he-IL/WOW/Support/wow/ADSLModems.htm # there is 29 modems now 24/4/07 #4. for bezeq: USB check + pppoa turnto pppoe and conffiles #5. for bezeq: Alcatel-570 pppoe with WIFI #6. for bezeq: ETH type |
קוד: |
$HOME/internetconnection/dhcpchecking.file |
קוד: |
# Must be root-this is from "Made by Marcelo A." script if test "$UID" != 0 ; then echo "I am going to execute su if You dont have root acount try to run \"sodu su\"" echo -e "This script must be run as root.\nType in root password, please." exec su exit 1 fi # this is made by me :-) Carmit Levi # dhcp client checking if [ -x "$(which dhclient)" ] then echo "You have dhclient as your dhcp client tool" if [ -z "$(ps -A | grep dhclient)" ] then echo "Execute dhclient" dhclient else echo "OK, dhclient is already running..." fi elif [ -x "$(which dhcpcd)" ] echo "You have dhcpcd as your dhcp client tool" if [ -z "$(ps -A | grep dhcpcd)" ] then echo "Execute dhcpcd" dhcpcd else echo "OK, dhcpcd is already running..." fi else echo "You dont have one of the dhcp client tools: dhcpcd or dhclient" echo "sorry" exit1 fi |
קוד: |
# ************ # = Tashtit = # ************ echo "Choose Bezeq or HOT 1 for Bezeq 2 for HOT." echo "1. Bezeq" echo "2. HOT" Tashtit="HOT" echo "[Default value is $Tashtit...]" read Tashtit if [ "$Tashtit" == "1" ] then Tashtit="Bezeq" echo "Chosen value is: $Tashtit" else Tashtit="HOT" echo "Chosen value is: $Tashtit" fi # so i know the tashtit now :-) # ************************************* # === whichISP === need ISPinfo file === ask if not bezeq # ************************************* if [ "$Tashtit" == "HOT" ] then echo "Choose the number which assosiated with your ISP." echo "[ 1 by default ...]" more +2 ISPinfo | awk {'print $1 "\t" $2'} read whichISP # input checking if [ -n "$whichISP" ] then echo "You insert $whichISP" echo "Input checking..." whichISP=$(echo $whichISP | grep '^[0-9]\{1,2\}$' | grep '^[1-9]') if [ -n "$whichISP" ] then maxISP=$(cat ISPinfo | tail -n 1 | awk {'print $1'}) if [[ "$maxISP" < "$whichISP" ]] then echo "Wrong value - greater then $maxISP. Use default" whichISP="1" more +2 ISPinfo | head -n $whichISP | tail -n 1 | awk {'print $1 "\t" $2'} else echo "You choose:" more +2 ISPinfo | head -n $whichISP | tail -n 1 | awk {'print $1 "\t" $2'} fi else echo "You insert Incorrect value. Use default value" whichISP="1" more +2 ISPinfo | head -n $whichISP | tail -n 1 | awk {'print $1 "\t" $2'} fi else echo "No input. Use default:" whichISP="1" more +2 ISPinfo | head -n $whichISP | tail -n 1 | awk {'print $1 "\t" $2'} fi fi #***************************************************** # ******************************** # == Username and password part == # ******************************** echo "Type connection Name" echo " Default value is your chossen ISP name for cables" echo " or Bezeq if it is" read connectionName if [ -z $connectionName ] then if [ "$Tashtit" == "HOT" ] then connectionName=$(more +2 ISPinfo | head -n $whichISP | tail -n 1 | awk {'print $2'}) else connectionName="Bezeq_Israel" fi fi echo "Type your username" read myUsername # username checking if [ -z "$myUsername" ] then echo "Exit script due to empty username" exit 1 fi if [ "$Tashtit" == "Bezeq" ] then if [ -z "$(echo $myUsername | grep @)" ] then echo "You say you are using ADSL Bezeq infrastructure" echo "but you type your username wrong without the \"@\" sign" echo "Please rerun the script with correct username" exit 1 fi fi echo "Type your password" read myPassword if [ -z "$myPassword" ] then echo "Exit script due to empty password" exit 1 fi echo echo "Connection name is: $connectionName * Username is: $myUsername * password is: $myPassword" #need to check username if it is with @ style or else #check if username already exist in papsecrets echo "\"$myUsername\" * \"$myPassword\" # $connectionName" >> /etc/ppp/pap-secrets echo "\"$myUsername\" * \"$myPassword\" # $connectionName" >> /etc/ppp/chap-secrets # ************************************************************** # == create the connection script # ********************************** # need net-dialup/rp-pppoe if [ "$Tashtit" == "Bezeq" ] then PPPfile=$(echo "$connectionName.pppoe.conf") echo "Configuration file for this connection: $PPPfile" cp pppoe.conf /etc/ppp/$PPPfile #daroosh shipuz kal else myHost=$(more +2 ISPinfo | head -n $whichISP | tail -n 1 | awk {'print $3'}) PPPconfile=$(echo $HOME/connect.$connectionName) # cat $HOME/internetconnection/dhcpchecking.file > $PPPconfile echo "myUGIP=\$(route | grep UG | awk {'print \$2'})" >> $PPPconfile echo "route add -host $myHost gw \$myUGIP" >> $PPPconfile echo "myHostIP=\$(route | grep UGH | awk {'print \$1'})" >> $PPPconfile echo "pptp \$myHostIP --debug user $myUsername mru 1500 mtu 1500 defaultroute usepeerdns" >> $PPPconfile echo "myPPTPIP=\$(route | grep UH | awk {'print \$1'})" >> $PPPconfile echo "route add default gw \$myPPTPIP" >> $PPPconfile echo "route del default gw \$myUGIP" >> $PPPconfile echo "To connect run as root $PPPconfile" chmod 755 $PPPconfile fi #*********************************************************************************8 |
קוד: |
[defaul value is ...] 2 ':not a valid identifier10: read: ` '/make_internet.sh: line18: syntax error near unexpected token ` '/make_internet.sh" line18: ` fi |
gonen (not logged-in) : |
well,
i'm currently writing from ubuntu LIVECD, therefor i dont have hebrew, and i'm not going to install hebrew on a temporary livecd i used the python script (don't know who wrote it) but running it as super-user conected me and saved all configuration. i say - if the python script works for every distro and every ISP it looks like the best solution, due to the fact it's already working. the best thing with it could be: 1) having a GUI for the script 2) another command or two to make it connect automatically on startup 3) having it connecting without sudo (firt run can be sudo, but each connection after settings are done, would be better without sudo) |
Anonymous : | ||
יופי שזה עובד לך, אבל זה עומד בניגוד מוחלט לאגו (הגברי?) של כרמית וטובת המשתמש. לפיכך, הצעתך נדחית, והמשך פיתוחם של עוד אשפים נוספים עם עוד באגים (כמובן, במקום לשפר את אלה שקיימים - למה הרי? אם אפשר ליצור עוד בעיות על חשבון טובת המשתמש?...) ימשך כמתוכנן. ראו הוזהרתם. מצטער, אבל זה פשוט היה מתבקש לאור האגו טריפ של הטוענת לכתר "נגד טובת הציבור" (בשם טובת הציבור...) |
Anonymous : | ||
יופי שזה עובד לך, אבל זה עומד בניגוד מוחלט לאגו (הגברי?) של כרמית וטובת המשתמש. לפיכך, הצעתך נדחית, והמשך פיתוחם של עוד אשפים נוספים עם עוד באגים (כמובן, במקום לשפר את אלה שקיימים - למה הרי? אם אפשר ליצור עוד בעיות על חשבון טובת המשתמש?...) ימשך כמתוכנן. ראו הוזהרתם. מצטער, אבל זה פשוט היה מתבקש לאור האגו טריפ של הטוענת לכתר "נגד טובת הציבור" (בשם טובת הציבור...) |
כרמית לוי : |
והאגו שלי הוא נשי ולא גברי כי ברגע שאני אספיק ללמוד לפתח ממשק גראפי בפייתון (כי זו אולי הכוונה ואולי בגלל זה זה מומר לפייתון מבש) לפניכם הגברים תהיו בטוחים בזה שאני אוסיף תמונה של פרפרים ופרחים ואולי גם ברבי ופינגיינית במקום פיגוין זכר אז כדאי לכם מאוד להשיג אותי לפני שאני אספיק ללמוד את זה וכמובן גם ליישם. |
meital : | ||
הממ...אם בא לך להמיר את זה לג'אווה אז אני מוכנה לכתוב את הממשק הורוד עם הברביות/פינגווינים ורודים/סוסי פוני/whatever... (או שאם עדיין לא יהיה ממשק עד החופש הגדול אז אני אלמד פייתון או משהו) |
קוד: |
while [ true ] do ifconfig down eth$ethnumber ifconfig up eth$ethnumber if [ "0" -ne "$?" ]; then exit 1; fi ethnumber=$(($ethnumber+1)) done |
קוד: |
ethnumber=$(($ethnumber+1)) |
קוד: |
let $ethnumber=$ethnumber+1 |
קוד: |
#this script create static script #to connect the internet with cables or adsl no wireless # ********************************************* # = Tashtit = HOT OR BEZEQ = CABLES OR ADSL # ********************************************* echo "Choose Bezeq or HOT 1 for Bezeq 2 for HOT." echo "1. Bezeq" echo "2. HOT" Tashtit="HOT" echo "[Default value is $Tashtit...]" read Tashtit if [ "$Tashtit" == "1" ] then Tashtit="Bezeq" echo "Chosen value is: $Tashtit" else Tashtit="HOT" echo "Chosen value is: $Tashtit" fi # so i know the tashtit now :-) # *********************************************************** # === whichISP === need ISPinfo file === ask if not bezeq # ************************************************************ if [ "$Tashtit" == "HOT" ] then echo "Choose the number which assosiated with your ISP." echo "[ 1 by default ...]" more +2 ISPinfo | awk {'print $1 "\t" $2'} read whichISP # input checking if [ -n "$whichISP" ] then echo "You insert $whichISP" echo "Input checking..." whichISP=$(echo $whichISP | grep '^[0-9]\{1,2\}$' | grep '^[1-9]') if [ -n "$whichISP" ] then maxISP=$(cat ISPinfo | tail -n 1 | awk {'print $1'}) if [[ "$maxISP" < "$whichISP" ]] then echo "Wrong value - greater then $maxISP. Use default" whichISP="1" more +2 ISPinfo | head -n $whichISP | tail -n 1 | awk {'print $1 "\t" $2'} else echo "You choose:" more +2 ISPinfo | head -n $whichISP | tail -n 1 | awk {'print $1 "\t" $2'} fi else echo "You insert Incorrect value. Use default value" whichISP="1" more +2 ISPinfo | head -n $whichISP | tail -n 1 | awk {'print $1 "\t" $2'} fi else echo "No input. Use default:" whichISP="1" more +2 ISPinfo | head -n $whichISP | tail -n 1 | awk {'print $1 "\t" $2'} fi fi #***************************************************** # ******************************** # == Username and password part == # ******************************** echo "Type connection Name" echo " Default value is your chossen ISP name for cables" echo " or Bezeq if it is" read connectionName if [ -z $connectionName ] then if [ "$Tashtit" == "HOT" ] then connectionName=$(more +2 ISPinfo | head -n $whichISP | tail -n 1 | awk {'print $2'}) else connectionName="Bezeq_Israel" fi fi echo "Type your username" read myUsername # username checking if [ -z "$myUsername" ] then echo "Exit script due to empty username" exit 1 fi if [ "$Tashtit" == "Bezeq" ] then if [ -z "$(echo $myUsername | grep @)" ] then echo "You say you are using ADSL Bezeq infrastructure" echo "but you type your username wrong without the \"@\" sign" echo "Please rerun the script with correct username" exit 1 fi fi echo "Type your password" read myPassword if [ -z "$myPassword" ] then echo "Exit script due to empty password" exit 1 fi echo echo "Connection name is: $connectionName * Username is: $myUsername * password is: $myPassword" #need to check username if it is with @ style or else #check if username already exist in papsecrets echo "\"$myUsername\" * \"$myPassword\" # $connectionName" #>> /etc/ppp/pap-secrets echo "\"$myUsername\" * \"$myPassword\" # $connectionName" #>> /etc/ppp/chap-secrets #*********************************************************************** # # check IFACE incase "$Tashtit" == "HOT" and hardware configuration # #********************************************** #******************************************** #*** clean previous network configuration *** #******************************************** rm -rf /var/run/pp* echo "Cleaning ... " killall -9 pptp killall -9 pptp-linux killall -9 dhclient killall -9 dhcpcd killall -9 pump #** ethNUM is eth counter ** ethNUM="0" while [ true ] do ifconfig eth$ethNUM down if [ "$?" != "0" ] then break else let ethNUM=$ethNUM+1 fi done #************************************** #*** check if kernel support usbnet *** #************************************** echo "*** Checking linux kernel support for USB Network" usbnetCHK=$(zcat /proc/config.gz | grep CONFIG_USB_NET_CDCETHER) if [ -z "$usbnetCHK" ] then echo "Can't find usbnet_cdcether in kernel" echo "Please recompile your kernel with USBNET and CDCETHER" echo "make menuconfig >> device drivers >> usb support >> usb network adapters >> Multi-purpose USB Networking Framework >> CDC Ethernet support " echo "*****************" exit 1 fi modprobe usbnet modprobe cdc_ether rm -rf /etc/dhcpc/dhcpcd-$IFACE.pid #********************************** # check which dhcp client #********************************** DHCP_CLIENT="none" which dhcpcd [ "$?" == "0" ] && DHCP_CLIENT="dhcpcd -t 15" which dhclient [ "$?" == "0" ] && DHCP_CLIENT="dhclient -1 -w" if [ "$DHCP_CLIENT" == "none" ] then echo "no dhcp found" exit 1 fi #***************************************************** # check which ethernetcard is connected #***************************************************** ethCount="0" myHost=$(more +2 ISPinfo | head -n $whichISP | tail -n 1 | awk {'print $3'}) IFACE="none" while [ "$ethCount" -lt "$ethNUM" ] do $DHCP_CLIENT eth$ethCount #$DHCP_CLIENT eth$ethCount if [ "$?" == "0" ] then myGW=$(route | grep eth$ethCount | grep 'UG ' | awk {'print $2'}) route add -host $myHost gw $myGW if [ "$?" == "0" ] then echo "found IFACE" IFACE=eth$ethCount break fi fi let ethCount=$ethCount+1 done if [ "$IFACE" == "none" ] then echo "cant find connected ethernet card" exit 1 fi #*********************************************** # whichpptp #**************************************** which pptp if [ "$?" == "0" ] then PPTPCLIENT="pptp" else which pptp-linux if [ "$?" == "0" ] then PPTPCLIENT="pptp-linux" else echo "Cant find pptp client" exit 1 fi fi # ************************************************************** # == create the connection script # ********************************** # need net-dialup/rp-pppoe if [ "$Tashtit" == "Bezeq" ] then PPPfile=$(echo "$connectionName.pppoe.conf") echo "Configuration file for this connection: $PPPfile" cp pppoe.conf /etc/ppp/$PPPfile #daroosh shipuz kal else PPPconfile=$(echo $HOME/connect.$connectionName) myHost=$(more +2 ISPinfo | head -n $whichISP | tail -n 1 | awk {'print $3'}) echo "CABLE_HOST=$myHost" > $PPPconfile echo "IFACE=$IFACE" >> $PPPconfile echo "USERNAME=$myUsername" >> $PPPconfile echo "DHCP_CLIENT=$DHCP_CLIENT" >> $PPPconfile echo "PPTP_CLIENT=$PPTPCLIENT" >> $PPPconfile cat part2_cablecon >> $PPPconfile echo "To connect run as root $PPPconfile" chmod 755 $PPPconfile fi #*********************************************************************************8 #Best list :-) #1. Best: HOT + terayon + ethernet card eth0 #2. workfine with USB #future Development #1. for HOT: wireless network auto configuration #3. for bezeq: # http://www.bezeq.co.il/Cultures/he-IL/WOW/Support/wow/ADSLModems.htm # there is 29 modems now 24/4/07 #4. for bezeq: USB check + pppoa turnto pppoe and conffiles #5. for bezeq: Alcatel-570 pppoe with WIFI (future is here :-P ) #6. for bezeq: ETH type #Todo list: #1. create constpath for the script files |
קוד: |
#*** check if root *** if [ $UID != "0" ] then echo "Please switch user to root before reruning the script" echo "by executing one of these this:" echo " su" echo " sudo su" exit 1 fi #*** clean previous network configuration *** rm -rf /var/run/pp* echo "Cleaning ... " killall -9 pptp killall -9 pptp-linux killall -9 dhclient killall -9 dhcpcd killall -9 pump modprobe usbnet modprobe cdc_ether ifconfig $IFACE down rm -rf /etc/dhcpc/dhcpcd-$IFACE.pid #*** the script know which dhcp client running my current is dhclient *** $DHCP_CLIENT $IFACE $DHCP_CLIENT $IFACE #*** Find gateway *** U_GW=$(route | grep 'UG ' | grep $IFACE | awk {'print $2'}) #*** connect cable host to gw *** route add -host $CABLE_HOST gw $U_GW dev $IFACE #*** connect to isp dailup server *** pptp $CABLE_HOST user $USERNAME debug remotename $CABLE_HOST mtu 1452 mru 1452 noauth defaultroute usepeerdns #*** wait to get isp ppp host server ip *** while [ "$TIMEOUT" -ne "0" ] do echo -n "..$TIMEOUT.." sleep 1 if [ -z "$(ifconfig | grep ppp0)" ]; then break; fi; TIMEOUT=$(($TIMEOUT-1)) done echo if [ "$TIMEOUT" -eq "0" ] then echo "Time out..." exit 1 fi #*** echo PPP_HOST=$(ifconfig ppp0 | grep inet | cut -d":" -f3 | tail -1 | cut -d" " -f1) #*** deleteOldSetNewRoute *** route del default dev $IFACE route add default gw $PPP_HOST #*** end script message *** echo "[OK connected.]" |
אייל : |
כרמית, מראש אני אגיד שהיוזמה ברוכה אבל אני מאמין שבצורה ריאלית יותר כדאי דווקא לכתוב סקריפט בפיתון.
הבסיס של cablecon.py הוא מצוין ובהחלט עושה עבודה יחסית טובה , אבל הוא חייב שכתוב ובדחיפות. תכנון נכון של סקריפט בפיתון יכול להיות מאוד חזק ולתת תאימות מצוינת למרבית ההפצות. אני מאמין שאולי עכשיו שיש יוזמה ויש אנשים שמעוניינים לעזור זה זמן טוב לעורר פרויקט כזה. מספר רשמים שאני מאמין שחשובים לפרויקט כזה: 1. הפרדת הממשק מהמנוע, ובעצם לכתוב פונקציות ג'נריות של: הדפסה למסך, שאילת שאלה, וכו, ובעצם על סמך זה ניתן יהיה להחליף את המנוע הגרפי בהתאם לאותו המחשב המקומי (ממשק קונסול, Tkinter, שימוש ב Zenity או dialog, או kdialog וכו...) 2. שימוש במידע שכבר קיים, בין היתר בפנגווין המדריך של האינטרנט בכבלים נותן רשימה גם של כל ההבדלים בין ההפצות שצריך לערוך בסקריפט שזה די נוח. כרמית לגבי ממשק משתמש אני מאמין שזה לא בהכרח חייב לפול עליך, כמו שאמרתי אם יוגדר API קבוע ואם תהיה הפרדה מסודרת בין הממשק למנוע, אז מספיק יהיה שהסקיפט יכתב בממשק טקסטואלי ואת הממשק הגרפי מישהו אחר יוסיף בהמשך. |
קוד: |
pppoe-connect /etc/ppp/pppoe2.conf
MYHOST=$(ifconfig | grep P-t-P | awk {'print $3'} | cut -d ':' -f 2) route add default gw $MYHOST route add 10.0.0.138 gw $MYHOST route del default gw 10.0.0.138 |
קוד: |
ETH='eth0'
USER='username@INetvision' DEMAND=no DNSTYPE=SERVER PEERDNS=yes DNS1= DNS2= CONNECT_TIMEOUT=30 CONNECT_POLL=2 ACNAME= SERVICENAME= PING="." PIDFILE="/var/run/$CF_BASE-pppoe.pid" SYNCHRONOUS=no CLAMPMSS=1412 LCP_INTERVAL=20 LCP_FAILURE=3 # PPPOE_TIMEOUT should be about 4*LCP_INTERVAL PPPOE_TIMEOUT=80 # Firewalling: One of NONE, STANDALONE or MASQUERADE FIREWALL=NONE # Linux kernel-mode plugin for pppd. If you want to try the kernel-mode # plugin, use LINUX_PLUGIN=rp-pppoe.so LINUX_PLUGIN= PPPOE_EXTRA="" # Rumour has it that "Citizen's Communications" with a 3Com # HomeConnect DSL Modem DualLink requires these extra options: # PPPOE_EXTRA="-f 3c12:3c13 -S ISP" PPPD_EXTRA="" |
Anonymous : |
על מה אתם בכלל מדברים???
תקנה ראוטר ב 50$ , תחבר אותו למחשב ותדליק את המחשב (כל הפצת לינוקס). על איזה סקריפטים בדיוק מדובר? למה צריך את זה? (48 תגובות??? על מה?) |
carmit_levi : | ||
בדיחה טובה בישראל חברות הכבלים וספקי האינטרנט דורשים שימוש בחייגן כדי לאמת שם משתמש וסיסמא... שיהיה ברור הסקריפט הזה מיועד רק לישראל ולהפצות ישראליות שירצו לעשות בו שימוש ולשפץ אותו. [כמו תרגום לפייתון בישביל ממשק משתמש גראפי למשל ותיקונים קטנים בבש סקריפט שכתבתי ]. |
Anonymous : | ||||
נראה לי שאת חייה בבועה. רוב הספקים בארץ נותנים אפשרות לראוטר. החייגן נמצא בראוטר. אני מציע לך לדבר עם הספקים ולשאול אותם, לפני כל האנרגיה הזאת שאת משקיעה. |
קוד: |
הזהconnectionName="input from GUI to file" |
קוד: |
myUsername="somthing from the GUI" |