wok annotate get-softmodem-driver/stuff/hsfmodem-7.80.02.04full.diff @ rev 7630

Fixed virtualbox-ose pre_remove and post_install with seeding MODULE_LIST.
author Christopher Rogers <slaxemulator@gmail.com>
date Sun Dec 12 19:51:46 2010 +0000 (2010-12-12)
parents e5ab27ad8b9e
children
rev   line source
domcox@3453 1 diff -ru hsfmodem-7.80.02.04full/config.mak hsfmodem-7.80.02.04full-slitaz/config.mak
domcox@3453 2 --- hsfmodem-7.80.02.04full/config.mak 2009-02-20 22:30:12.000000000 +0100
domcox@3453 3 +++ hsfmodem-7.80.02.04full-slitaz/config.mak 2009-06-15 11:49:13.000000000 +0200
domcox@3453 4 @@ -131,4 +131,4 @@
domcox@3453 5 -e "s!@SCR_SUPPORT@!`test ! \"$(IMPORTED_SCR_SUPPORT)\" = yes; echo $$?`!g" \
domcox@3453 6 -e "s!@DMP_SUPPORT@!`test -z \"$(IMPORTED_DMP_SUPPORT)\"; echo $$?`!g" \
domcox@3453 7 < $< > $@
domcox@3453 8 - chmod --reference=$< $@
domcox@3453 9 + chmod 755 $@
domcox@3453 10 diff -ru hsfmodem-7.80.02.04full/makefile hsfmodem-7.80.02.04full-slitaz/makefile
domcox@3453 11 --- hsfmodem-7.80.02.04full/makefile 2009-02-23 22:51:37.000000000 +0100
domcox@3453 12 +++ hsfmodem-7.80.02.04full-slitaz/makefile 2009-06-15 11:49:13.000000000 +0200
domcox@3453 13 @@ -149,7 +149,7 @@
domcox@3453 14 ifeq ($(RPMOPTEVAL),yes)
domcox@3453 15 RPMTARGETCPU=$(shell rpm --eval '%_target_cpu')
domcox@3453 16 else
domcox@3453 17 -RPMTARGETCPU=$(shell uname -i)
domcox@3453 18 +RPMTARGETCPU=$(shell uname -m)
domcox@3453 19 endif
domcox@3453 20
domcox@3453 21 ifneq ($(RPMOPTDEFINE),yes)
domcox@3453 22 diff -ru hsfmodem-7.80.02.04full/modules/Makefile hsfmodem-7.80.02.04full-slitaz/modules/Makefile
domcox@3453 23 --- hsfmodem-7.80.02.04full/modules/Makefile 2009-04-24 03:03:57.000000000 +0200
domcox@3453 24 +++ hsfmodem-7.80.02.04full-slitaz/modules/Makefile 2009-06-15 11:49:13.000000000 +0200
domcox@3453 25 @@ -20,7 +20,7 @@
domcox@3453 26 include $(TOP)/config.mak
domcox@3453 27
domcox@3453 28 IMPORTED = $(TOP)/modules/imported
domcox@3453 29 -MACHINE_ARCH := $(shell if uname --hardware-platform >/dev/null 2>&1 && ! uname --hardware-platform | grep -q "unknown"; then uname --hardware-platform; else uname --machine | sed 's/^i.86$$/i386/'; fi)
domcox@3453 30 +MACHINE_ARCH := $(shell if uname -p >/dev/null 2>&1 && ! uname -p | grep -q "unknown"; then uname -p; else uname -m | sed 's/^i.86$$/i386/'; fi)
domcox@3453 31 ifneq ($(subst powerpc,ppc,$(IMPORTED_ARCH)),$(MACHINE_ARCH))
domcox@3453 32 $(warning *** WARNING: Trying to compile kernel modules on a $(MACHINE_ARCH) system while the installed $(CNXTTARGET) driver package is for $(IMPORTED_ARCH), this is likely to fail... ***)
domcox@3453 33 endif
domcox@3453 34 diff -ru hsfmodem-7.80.02.04full/scripts/cnxtconfig.in hsfmodem-7.80.02.04full-slitaz/scripts/cnxtconfig.in
domcox@3453 35 --- hsfmodem-7.80.02.04full/scripts/cnxtconfig.in 2009-04-23 17:32:18.000000000 +0200
domcox@3459 36 +++ hsfmodem-7.80.02.04full-slitaz/scripts/cnxtconfig.in 2009-06-15 21:29:49.000000000 +0200
domcox@3453 37 @@ -74,7 +74,7 @@
domcox@3453 38 answer="${region}"
domcox@3453 39 ;;
domcox@3453 40 *)
domcox@3453 41 - answer="`echo \"${answer}\" | tr '[a-z ]' '[A-Z_]'`"
domcox@3453 42 + answer="`echo \"${answer}\" | tr '[a-z]' '[A-Z]' | sed 's/\s/_/g'`"
domcox@3453 43 ;;
domcox@3453 44 esac
domcox@3453 45 fi
domcox@3453 46 @@ -109,15 +109,13 @@
domcox@3453 47 {
domcox@3453 48 # Try to guess what region we're in, using the timezone settings
domcox@3453 49
domcox@3453 50 - localtime_size="`/bin/ls -lL /etc/localtime 2>/dev/null | ${AWK} '{print $5}'`"
domcox@3453 51 -
domcox@3453 52 - if ! [ ${localtime_size} -gt 0 ]; then
domcox@3453 53 + if [ ! -e /etc/TZ ]; then
domcox@3453 54 return 1
domcox@3453 55 fi
domcox@3453 56
domcox@3453 57 - zoneinfo_dir=/usr/share/zoneinfo
domcox@3494 58 + zoneinfo_dir=/usr/share/hsfmodem
domcox@3453 59
domcox@3453 60 - if [ ! -d ${zoneinfo_dir} -o ! -f ${zoneinfo_dir}/zone.tab ]; then
domcox@3494 61 + if [ ! -f ${zoneinfo_dir}/zone.tab ]; then
domcox@3453 62 return 1
domcox@3453 63 fi
domcox@3453 64
domcox@3453 65 @@ -206,18 +204,11 @@
domcox@3453 66 iso_VN=00BC # VIETNAM
domcox@3453 67
domcox@3453 68 (
domcox@3453 69 - cd ${zoneinfo_dir} 2>/dev/null || return 1
domcox@3453 70 - find . -type f -size "${localtime_size}"c -print | sed 's@^\./@@' | \
domcox@3453 71 - while read file; do
domcox@3453 72 - cmp -s /etc/localtime $file || continue
domcox@3453 73 -# in the egrep and sed regular expressions below, it is very important to
domcox@3453 74 -# have tabs, not spaces
domcox@3453 75 - egrep " $file( .*|\$)" ${zoneinfo_dir}/zone.tab
domcox@3453 76 - done | sed -n '/^[^#]/s/ .*//p' | sort | uniq | \
domcox@3453 77 - while read code; do
domcox@3453 78 - eval "echo \${iso_${code}}"
domcox@3453 79 - done | sort | uniq
domcox@3453 80 + zone=`cat /etc/TZ`
domcox@3494 81 + code=`grep $zone ${zoneinfo_dir}/zone.tab | awk '{print $1}' | sort | uniq`
domcox@3453 82 + eval "echo \${iso_${code}}"
domcox@3453 83 return 0
domcox@3453 84 +
domcox@3453 85 )
domcox@3453 86 }
domcox@3453 87
domcox@3459 88 @@ -271,7 +262,7 @@
domcox@3459 89 # The md5sum is used for input verification.
domcox@3459 90 disptokey()
domcox@3459 91 {
domcox@3459 92 - k="`echo \"$1\" | tr '[a-z]' '[A-Z]' | sed 's/FREE/00000000/' | tr -d -c '[0-9A-F\012]'`"
domcox@3459 93 + k="`echo \"$1\" | tr '[a-z]' '[A-Z]' | sed 's/FREE/00000000/' | tr -d -c '[0-9][A-F][\012]'`"
domcox@3459 94 case $k in
domcox@3459 95 00000000)
domcox@3459 96 echo "$k"
domcox@3453 97 @@ -1655,7 +1646,7 @@
domcox@3453 98 update-modules
domcox@3453 99 else
domcox@3453 100 if ("$@" "${modulesconf}" | "${filter}"; cat ${f}) > ${modulesconf}.$$; then
domcox@3453 101 - if ! cmp --silent ${modulesconf}.$$ ${modulesconf}; then
domcox@3453 102 + if ! cmp -s ${modulesconf}.$$ ${modulesconf}; then
domcox@3453 103 if ! cp ${modulesconf}.$$ ${modulesconf}; then
domcox@3453 104 rm -f ${modulesconf}.$$ ${f}
domcox@3453 105 exit 1
domcox@3453 106 @@ -1681,7 +1672,7 @@
domcox@3453 107 fi
domcox@3453 108
domcox@3453 109 if ("$@" "${modprobeconf}" | "${filter}"; cat ${f}) > ${modprobeconf}.$$; then
domcox@3453 110 - if ! cmp --silent ${modprobeconf}.$$ ${modprobeconf}; then
domcox@3453 111 + if ! cmp -s ${modprobeconf}.$$ ${modprobeconf}; then
domcox@3453 112 if ! cp ${modprobeconf}.$$ ${modprobeconf}; then
domcox@3453 113 rm -f ${modprobeconf}.$$ ${f}
domcox@3453 114 exit 1
domcox@3453 115 @@ -2214,6 +2205,10 @@
domcox@3453 116 elif [ -d /var/lib/LST ]; then
domcox@3453 117 OSDISTNAME=Caldera
domcox@3453 118 OSDISTIDNT=caldera
domcox@3453 119 + elif [ -f /etc/slitaz-release ]; then
domcox@3453 120 + OSDISTNAME=SliTaz
domcox@3453 121 + OSDISTIDNT=slitaz
domcox@3453 122 + OSDISTVERS="`cat /etc/slitaz-release`"
domcox@3453 123 fi
domcox@3453 124
domcox@3453 125 OSKERNNAME="`uname -s | tr '[A-Z]' '[a-z]'`"
domcox@3453 126 @@ -2268,7 +2263,7 @@
domcox@3453 127
domcox@3453 128 dump_file()
domcox@3453 129 {
domcox@3453 130 - dump_cmd cat -v $@
domcox@3453 131 + dump_cmd cat $@
domcox@3453 132 }
domcox@3453 133
domcox@3453 134 dump_diagnostics()
domcox@3453 135 @@ -2587,7 +2582,7 @@
domcox@3453 136 fi
domcox@3453 137 units="${specificunit}"
domcox@3453 138 if [ -z "${units}" ]; then
domcox@3453 139 - units=`ls --ignore=flush_nvm ${procdrvdir}`
domcox@3453 140 + units=`ls ${procdrvdir} | grep -v flush_nvm`
domcox@3453 141
domcox@3453 142 if [ -z "${units}" ]; then
domcox@3453 143 echo ""
domcox@3453 144 @@ -2884,7 +2879,7 @@
domcox@3453 145 explicitopt=true
domcox@3453 146 do_cfgregion=true
domcox@3453 147 if [ -n "$2" ]; then
domcox@3453 148 - setregion="`echo \"$2\" | tr '[a-z ]' '[A-Z_]'`"
domcox@3453 149 + setregion="`echo \"$2\" | tr '[a-z]' '[A-Z]' | sed 's/\s/_/g'`"
domcox@3453 150 fi
domcox@3453 151 shift 2
domcox@3453 152 ;;
domcox@3459 153 @@ -2954,6 +2949,6 @@
domcox@3453 154
domcox@3453 155 # Accept --region <name> as equivalent to --region=<name>
domcox@3453 156 if ${do_cfgregion} && [ $# -ge 1 -a -z "${setregion}" ]; then
domcox@3453 157 - setregion="`echo \"$1\" | tr '[a-z ]' '[A-Z_]'`"
domcox@3453 158 + setregion="`echo \"$1\" | tr '[a-z]' '[A-Z]' | sed 's/\s/_/s'`"
domcox@3453 159 shift
domcox@3453 160 fi
domcox@3453 161
domcox@3478 162 @@ -3033,0 +3027,0 @@
domcox@3478 163
domcox@3478 164 if ${do_cfgnewinstance}; then
domcox@3478 165 if [ ! -d "${cnxtnvmdir}/dynamic/${newinstance}" ]; then
domcox@3478 166 - mkdir --mode=700 --parents "${cnxtnvmdir}/dynamic/${newinstance}" || exit $?
domcox@3478 167 + mkdir -m 700 -p "${cnxtnvmdir}/dynamic/${newinstance}" || exit $?
domcox@3478 168 # The purpose of --info here is to ensure module reload:
domcox@3478 169 (sleep 2; exec @CNXTTARGET@config --auto --region=AUTO --info) </dev/null >/dev/null 2>&1 &
domcox@3478 170 fi