summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjaromil <jaromil@129b00e9-8bf7-0310-bee9-bd51b64996e4>2007-10-22 17:31:34 (GMT)
committer jaromil <jaromil@129b00e9-8bf7-0310-bee9-bd51b64996e4>2007-10-22 17:31:34 (GMT)
commitee7aae8016f5b9e97371307186eaaaa2eb6c59fa (patch)
tree4420b93bc3ab99d4c5dc88ac05faa633038bd48e
parent86dd541e48b75aaa0040822e2fc1207a2e89f608 (diff)
fix for docking on usb2.0 storage,
other fixes git-svn-id: svn://dyne.org/dynebolic@256 129b00e9-8bf7-0310-bee9-bd51b64996e4
-rwxr-xr-xdyneII/startup/bin/dyneupdate97
-rw-r--r--dyneII/startup/lib/bootstrap.sh3
-rw-r--r--dyneII/startup/lib/dyne.applist5
-rw-r--r--dyneII/startup/lib/utils.sh6
-rw-r--r--dyneII/startup/lib/wmaker.sh2
-rw-r--r--dyneII/startup/zsh/common2
6 files changed, 81 insertions, 34 deletions
diff --git a/dyneII/startup/bin/dyneupdate b/dyneII/startup/bin/dyneupdate
index 44ae69f..fb84ac1 100755
--- a/dyneII/startup/bin/dyneupdate
+++ b/dyneII/startup/bin/dyneupdate
@@ -9,6 +9,9 @@ source /boot/dynenv
source /lib/dyne/utils.sh
source /lib/dyne/dialog.sh
+samba=true
+rsync=true
+
if [ -z $1 ]; then
notice "usage: dyneupdate host_or_ip"
exit 0
@@ -36,16 +39,27 @@ smbclient -c 'get VERSION /tmp/VERSION' \
//${host}/dyne.dock -N 2>/dev/null 1>/dev/null
if [ $? = 1 ]; then
- error "error updating from ${host}: unreachable or dyne.dock not present"
- sleep 10
- exit 1
+ act "no samba shared dock found on host"
+ samba=false
+
+ rsync ${host}::dyne.dock/VERSION /tmp/VERSION
+ if [ $? != 0 ]; then
+ act "no rsync dock modules found on host"
+ error "no shared system on host"
+ rsync=false
+ sleep 10
+ exit 1
+ fi
fi
source /tmp/VERSION
+rm -f /tmp/VERSION
host_sys_ver=${DYNE_SYS_VER}
host_initrd_ver=${DYNE_INITRD_VER}
act "${host} runs a dyne OS version sys:${host_sys_ver} initrd:${host_initrd_ver}"
+if [ "$samba" = "true" ]; then act "samba connection open"; fi
+if [ "$rsync" = "true" ]; then act "rsync connection open"; fi
source ${DYNE_SYS_MNT}/VERSION
my_sys_ver=${DYNE_SYS_VER}
@@ -58,32 +72,44 @@ touch /tmp/update.actions
is_new_version ${my_sys_ver} ${host_sys_ver}
if [ $? = 0 ]; then
act "sys is newer, updating"
- mkdir -p ${DYNE_SYS_MNT}/update
- echo "sys dyne.sys ${my_sys_ver} ${host_sys_ver}" >> /tmp/update.actions
+ echo "sys dyne.sys ${host_sys_ver}" >> /tmp/update.actions
# smbclient -c 'get dyne.sys ${DYNE_SYS_MNT}/update' \
# //${host}/dyne.dock -N 2>/dev/null 1>/dev/null
fi
-smbclient -c 'get SDK/cdrom/dyne/VERSION /tmp/VERSION' \
- //${host}/dyne.dock -N 2>/dev/null 1>/dev/null
+if [ "$samba" = "true" ]; then
+ smbclient -c 'get SDK/cdrom/dyne/VERSION /tmp/VERSION' \
+ //${host}/dyne.dock -N 2>/dev/null 1>/dev/null
+else
+ rsync ${host}::dyne.dock/SDK/cdrom/dyne/VERSION /tmp/VERSION
+fi
if [ $? = 0 ]; then
- source /tmp/VERSION
- host_sys_ver=${DYNE_SYS_VER}
- host_initrd_ver=${DYNE_INITRD_VER}
- act "${host} has a dyne:SDK version sys:$host_sys_ver initrd:$host_initrd_ver"
- echo "is_new_version ${my_sys_ver} ${host_sys_ver}"
- if [ $? = 0 ]; then
- act "SDK sys is newer, updating"
- mkdir -p ${DYNE_SYS_MNT}/update
- echo "sdk dyne.sys ${my_sys_ver} ${host_sys_ver}" >> /tmp/update.actions
+ source /tmp/VERSION
+ host_sdk_sys_ver=${DYNE_SYS_VER}
+ host_sdk_initrd_ver=${DYNE_INITRD_VER}
+ act "${host} has a dyne:SDK version sys:$host_sdk_sys_ver initrd:$host_sdk_initrd_ver"
+ is_new_version ${my_sys_ver} ${host_sdk_sys_ver}
+ if [ $? = 0 ]; then
+ is_new_version ${host_sys_ver} ${host_sdk_sys_ver}
+ if [ $? = 0 ]; then
+ act "SDK on host is newer, updating"
+ sed -i -e 's/^sys.*//g' /tmp/update.actions
+ echo "sdk dyne.sys ${host_sdk_sys_ver}" >> /tmp/update.actions
# smbclient -c 'get SDK/cdrom/dyne/dyne.sys ${DYNE_SYS_MNT}/update' \
# //${host}/dyne.dock -N 2>/dev/null 1>/dev/null
# sleep 10
- fi
+ fi
+ fi
fi
-mods="`smbclient -c 'ls modules/*' //${host}/dyne.dock -N 2>/dev/null | grep dyne`"
+if [ "$samba" = "true" ]; then
+ mods="`smbclient -c 'ls modules/*' //${host}/dyne.dock -N 2>/dev/null`"
+ mods=`echo ${mods} | awk '/dyne/ { if($2=="R") print $1 " " $3; else print $1 " " $2 }'`
+else
+ mods="`rsync 10.66.66.72::dyne.dock/modules/`"
+ mods=`echo ${mods} | awk '/dyne$/ {print $5 " " $2}'`
+fi
if [ $? = 0 ]; then
nmods=`echo ${mods} | wc -l`
@@ -103,7 +129,7 @@ for m in ${(f)mods}; do
tag=`echo ${m} | awk '{print $1}'`
if [ -r ${DYNE_SYS_MNT}/modules/${tag} ]; then continue; fi
size=`echo ${m} | awk '{ if($2=="R") print $3; else print $2}'`
- size=`echo "${size}/1024"|bc`
+ size="`echo ${size}/1024|bc`"
echo "${tag} \"${size} KB\" ${host}" >> /tmp/dialogarg
done
@@ -116,13 +142,34 @@ for i in ${(f)inst}; do
echo "mod $i" >> /tmp/update.actions
done
-acts=`cat /tmp/update.actions`
+acts=`cat /tmp/update.actions `
-ask_yesno 10 "confirm updating from ${host}:\n$acts"
+ask_yesno 10 "confirm updating from ${host}:\n\n$acts"
if [ $? = 1 ]; then
echo "update"
-fi
-for a in ${(f)acts}; do
- act "${a}"
-done
+ mkdir -p $DYNE_SYS_MNT/update
+
+ for a in ${(f)acts}; do
+ act "${a}"
+ echo ${a} | grep '^mod'
+ if [ $? = 0 ]; then
+ mkdir -p $DYNE_SYS_MNT/update/modules
+ mod="`echo ${a}|awk '{print $2}'`"
+ if [ "$rsync" = "true" ]; then
+ rsync -P "${host}::dyne.dock/modules/`echo ${a}|awk '{print $2}'`" $DYNE_SYS_MNT/update/modules/
+ fi
+ fi
+ echo ${a} | grep '^sys|^sdk'
+ if [ $? = 0 ]; then
+ sys="`echo ${a}|awk '{print $2}'`"
+ if [ "$rsync" = "true" ]; then
+ cp ${DYNE_SYS_MNT}/dyne.sys $DYNE_SYS_MNT/update/
+ fi
+ # TODO QUAA
+ fi
+ done
+
+else
+ error "aborted"
+fi \ No newline at end of file
diff --git a/dyneII/startup/lib/bootstrap.sh b/dyneII/startup/lib/bootstrap.sh
index 42feddb..540c3ae 100644
--- a/dyneII/startup/lib/bootstrap.sh
+++ b/dyneII/startup/lib/bootstrap.sh
@@ -159,6 +159,7 @@ if [ "`dmesg | grep 'USB hub found'`" ]; then
# start loading the usb storage
loadmod usb-storage
+ loadmod ehci-hcd
sync
@@ -442,8 +443,6 @@ source /boot/dynenv
######## HOME IS MOUNTER HERE
############ ALL MEDIA MOUNTED, now MOUNT dyne.sys
-ln -s ${DYNE_SYS_MOUNT} /mnt/dyne
-
########################################
## check if a dock was really found
## or volatile mode was choosen
diff --git a/dyneII/startup/lib/dyne.applist b/dyneII/startup/lib/dyne.applist
index 9c0d9db..3d649ba 100644
--- a/dyneII/startup/lib/dyne.applist
+++ b/dyneII/startup/lib/dyne.applist
@@ -60,10 +60,11 @@ Begin | AUDIO
Begin | PLAY
-Xmms | hifi audio player | xmms | | www.xmms.org | Xmms team
+Audacious | new audio player | audacious | | audacious-media-player.org | Audacious Media Player team
Amarok | music jukebox | amarok | | amarok.kde.org | Amarok dev team
StreamTuner | internet radio | streamtuner | | streamtuner.sf.net | StreamTuner developers
Timidity | midi player | timidity -ig | | timidity WEB | Timidity auth
+Xmms | old audio player | xmms | | www.xmms.org | Xmms team
MikMod | track player | mikmod | terminal | mikmod.raphnet.net | MikMod team
End | PLAY
@@ -91,7 +92,7 @@ PD | pure data signal processing | pd | terminal | pure-data.org | Miller Pucket
Begin | REC / EDIT
-Ardour 2 | multitrack studio | ardour2 | | www.ardour.org | Paul Davis
+Ardour 2 | multitrack studio | ardour2 | | www.ardour.org | Paul Davis
Ardour | multitrack studio | ardour | | www.ardour.org | Paul Davis
Audacity | audio editor | audacity | | audacity.sf.net | Dominique Mazzoni
ReZound | sample editor | rezound | | rezound.sf.net | rezound auth
diff --git a/dyneII/startup/lib/utils.sh b/dyneII/startup/lib/utils.sh
index 1cc05b0..a2f6be9 100644
--- a/dyneII/startup/lib/utils.sh
+++ b/dyneII/startup/lib/utils.sh
@@ -506,14 +506,14 @@ is_new_version() {
'`"
o="`echo $o | cut -d- -f1`" # strip dashed codenames
- if [ ${o} -gt ${n} ]; then return 1; fi
- if [ ${n} -gt ${o} ]; then return 0; fi
+ if [ `echo "$o > $n"|bc` = 1 ]; then return 1; fi
+ if [ `echo "${n} > ${o}"|bc` = 1 ]; then return 0; fi
done
# return 1 (not new) if same version
- if [ ${o} -eq ${n} ]; then return 1; fi
+ if [ `echo "$o = $n"|bc` = 1 ]; then return 1; fi
return 0
}
diff --git a/dyneII/startup/lib/wmaker.sh b/dyneII/startup/lib/wmaker.sh
index 6652ff6..1e055db 100644
--- a/dyneII/startup/lib/wmaker.sh
+++ b/dyneII/startup/lib/wmaker.sh
@@ -893,7 +893,7 @@ dyne_startx() {
source /etc/LANGUAGE
- if [ $KEYB ]; then
+ if [ "$KEYB" ]; then
(sleep 2; /usr/X11R6/bin/setxkbmap $KEYB &)&
fi
diff --git a/dyneII/startup/zsh/common b/dyneII/startup/zsh/common
index cccd866..3a1097e 100644
--- a/dyneII/startup/zsh/common
+++ b/dyneII/startup/zsh/common
@@ -3,7 +3,7 @@
# by jaromil http://rastasoft.org
export HOSTTYPE="i586"
-export LANG="C"
+# export LANG="C"
export MACHTYPE="i586-pc-linux-gnu"
export OSTYPE="linux-gnu"
export SHELL="/bin/zsh"