rev |
line source |
domcox@12276
|
1 --- slitaz-tools-4.9.1/installer/tazinst
|
domcox@12276
|
2 +++ /usr/sbin/tazinst
|
domcox@12276
|
3 @@ -20,7 +20,7 @@
|
domcox@12276
|
4 # 7: Another instance is running
|
domcox@12276
|
5 # 8: Internal error
|
domcox@12276
|
6
|
domcox@12276
|
7 -VERSION=3.32
|
domcox@12276
|
8 +VERSION=3.34
|
domcox@12276
|
9
|
domcox@12276
|
10 # Internationalization
|
domcox@12276
|
11 . /usr/bin/gettext.sh
|
domcox@12276
|
12 @@ -115,6 +115,7 @@
|
domcox@12276
|
13 gen_setup()
|
domcox@12276
|
14 {
|
domcox@12276
|
15 SETUP=$1
|
domcox@12276
|
16 + [ -z "$1" ] && abort 1 "Missing <file> parameter for install configuration"
|
domcox@12276
|
17 touch $SETUP || abort 2 $(gettext "Can't write setup file")
|
domcox@12276
|
18 if [ -r "$SETUP" ]; then
|
domcox@12276
|
19 cat > $SETUP << _EOF_
|
domcox@12276
|
20 @@ -172,7 +173,7 @@
|
domcox@12276
|
21 TGT_WINBOOT=""
|
domcox@12276
|
22
|
domcox@12276
|
23 _EOF_
|
domcox@12276
|
24 -
|
domcox@12276
|
25 + echo "$(ls $1)" $(gettext "created")
|
domcox@12276
|
26 else
|
domcox@12276
|
27 abort 2 $(gettext "Setup file not found")
|
domcox@12276
|
28 fi
|
domcox@12276
|
29 @@ -339,10 +340,10 @@
|
domcox@12276
|
30 btrfs|ext2|ext3|ext4|fat16|fat32|hfs|hfs+|jfs|ntfs|reiser4|reiserfs|ufs|xfs)
|
domcox@12276
|
31 found=no
|
domcox@12276
|
32 for xdir in /sbin /usr/sbin /usr/bin; do
|
domcox@12276
|
33 - [ -x "$xdir/mkfs.$TGT_FS" ] && found=yes
|
domcox@12276
|
34 + [ -x "$xdir/mkfs.$TGT_HOME_FS" ] && found=yes
|
domcox@12276
|
35 done
|
domcox@12276
|
36 if [ "$found" == "no" ]; then
|
domcox@12276
|
37 - msg "$TGT_FS: mkfs.$TGT_FS $(gettext "is not installed")"; error=yes
|
domcox@12276
|
38 + msg "$TGT_FS: mkfs.$TGT_HOME_FS $(gettext "is not installed")"; error=yes
|
domcox@12276
|
39 fi ;;
|
domcox@12276
|
40 *) msg "$TGT_HOME_FS: $(gettext "Unknown filesystem (/home)")"; error=yes ;;
|
domcox@12276
|
41 esac
|
domcox@12276
|
42 @@ -774,20 +775,39 @@
|
domcox@12276
|
43 debug "Searching for Windows"
|
domcox@12276
|
44 if [ "$TGT_WINBOOT" == "auto" ];then
|
domcox@12276
|
45 WINBOOT=$(fdisk -l | awk '
|
domcox@12276
|
46 -BEGIN{disk=-1, found=-1, winboot=""}
|
domcox@12276
|
47 +BEGIN{
|
domcox@12276
|
48 + disk=-1
|
domcox@12276
|
49 + found=0
|
domcox@12276
|
50 + winboot=""}
|
domcox@12276
|
51 {
|
domcox@12276
|
52 - # Counting disk
|
domcox@12276
|
53 - if ($1=="Disk"){disk++, part=-1}
|
domcox@12276
|
54 - # Counting partition
|
domcox@12276
|
55 - if (substr($1,1,4)=="/dev"){part++}
|
domcox@12276
|
56 - # Read partition Id
|
domcox@12276
|
57 - if ($2=="*"){Id=$6} else {Id=$5}
|
domcox@12276
|
58 - # Detect Windows type
|
domcox@12276
|
59 - if (Id=="7" || Id=="b"){
|
domcox@12276
|
60 - if (found){
|
domcox@12276
|
61 - # record 1st Windows partition found
|
domcox@12276
|
62 - winboot=sprintf("hd%d,%d",disk,part),found++}
|
domcox@12276
|
63 + # Count disks
|
domcox@12276
|
64 + if ($1=="Disk"){
|
domcox@12276
|
65 + disk++
|
domcox@12276
|
66 + part=-1
|
domcox@12276
|
67 + dev=substr($2,6,3)
|
domcox@12276
|
68 + # get removable status
|
domcox@12276
|
69 + file="/sys/block/"dev"/removable"
|
domcox@12276
|
70 + "cat " file | getline removable
|
domcox@12276
|
71 + close("cat ")
|
domcox@12276
|
72 +}
|
domcox@12276
|
73 + # Count partitions
|
domcox@12276
|
74 + if (substr($1,1,4)=="/dev"){
|
domcox@12276
|
75 + # List fixed drives only
|
domcox@12276
|
76 + if (removable==0){
|
domcox@12276
|
77 + part++
|
domcox@12276
|
78 + # Read partition Id
|
domcox@12276
|
79 + if ($2=="*"){Id=$6} else {Id=""}
|
domcox@12276
|
80 + # Detect Windows Partition Type: 7,b,c,e,f
|
domcox@12276
|
81 + WPT="[7bcef]"
|
domcox@12276
|
82 + if (Id ~ WPT){
|
domcox@12276
|
83 + found++
|
domcox@12276
|
84 + # record 1st Windows partition found
|
domcox@12276
|
85 + if (found==1){
|
domcox@12276
|
86 + winboot=sprintf("hd%d,%d",disk,part)
|
domcox@12276
|
87 + }
|
domcox@12276
|
88 + }
|
domcox@12276
|
89 }
|
domcox@12276
|
90 + }
|
domcox@12276
|
91 }
|
domcox@12276
|
92 END{printf "%s", winboot}')
|
domcox@12276
|
93 if [ -z "$WINBOOT" ]; then
|
domcox@12276
|
94 @@ -1201,6 +1221,7 @@
|
domcox@12276
|
95 new)
|
domcox@12276
|
96 gen_setup $2 ;;
|
domcox@12276
|
97 showurl)
|
domcox@12276
|
98 + LOG="/dev/null"
|
domcox@12276
|
99 case $2 in
|
domcox@12276
|
100 stable)
|
domcox@12276
|
101 echo $URL_STABLE ;;
|
domcox@12276
|
102 @@ -1208,6 +1229,8 @@
|
domcox@12276
|
103 echo $URL_COOKING ;;
|
domcox@12276
|
104 rolling)
|
domcox@12276
|
105 echo $URL_ROLLING ;;
|
domcox@12276
|
106 + *)
|
domcox@12276
|
107 + abort 1 $(gettext "Unknown url shortcut")
|
domcox@12276
|
108 esac ;;
|
domcox@12276
|
109 check)
|
domcox@12276
|
110 LOG="/dev/null"
|