Koozali.org: home of the SME Server

Version 3 of unofficial update script

Offline gregswallow

  • *
  • 651
  • +1/-0
Version 3 of unofficial update script
« on: November 26, 2004, 11:29:52 PM »
I just put up a completely updated version on the Wiki page, it has the error checking for downloads thanks to help from smeghead, and I changed a few of the contribs around a bit. It works better than the previous version, and the error checking stops you from continuing if there is a dead/changed link.

Thanks to everyone who kept the other version up to date, and please continue with this new version.

Wiki Page:
http://no.longer.valid/phpwiki/index.php?pagename=Latest%20version%20of%20update%20scripts

Greg Swallow

Offline Tib

  • *
  • 571
  • +0/-0
    • http://www.tibors.net
Version 3 of unofficial update script
« Reply #1 on: November 27, 2004, 01:15:46 PM »
hello greg,

and I just updated my server last night :(

Now I'll have to do it again.

Great work guys.

Ohh yeh ... the last update worked fine on my slightly modified 6.0.1-01 install. Nothing broke ... nothing I have found yet anyway.

I'll try out the new setup soon.

Tib

jcoleman

Version 3 of unofficial update script
« Reply #2 on: November 27, 2004, 05:05:40 PM »
Greg,

I fixed a small typo in the script in the wiki.  

In line 286 you had echo spelled "ehco".  Other than that, this thing is great!

Thanks for the fine work!

-jeff

Offline stefan24

  • ****
  • 483
  • +0/-0
    • www.sme-server.de
Version 3 of unofficial update script
« Reply #3 on: November 29, 2004, 12:13:11 PM »
Hi Greg!

I just found your update while testing my version of the script. I would not recommend the MySQL script from ergozd, until he fixes some errors (I will write him immediately).

I either would not use /root/plus, but leave all paths relative to the pwd.

I also added in my version
 - a ping check for existance of www.contribs.org,
 - a check for SME 6.0.1-01,
 - a question, if the optional contribs should be downloaded and installed
 -  and a optional e-mail to me, if there are download errors in the script (not stable until now)

I will put in the stable parts of my script ASAP.

But I like your download status bar. <g>

Stefan

Offline stefan24

  • ****
  • 483
  • +0/-0
    • www.sme-server.de
Update script for SME 6.0
« Reply #4 on: November 29, 2004, 02:39:22 PM »
Hi!

I created an update script for SME 6.0 (final) to a SME 6.0.1-01.

I will put this in the Update Script at
http://no.longer.valid/phpwiki/index.php?pagename=Latest%20version%20of%20update%20scripts
if someone with an existing SME 6.0 server will test it.
I compared the rpmlists of two SME servers, one from a SME 6.0 final, one from a SME 6.0.1-01 server.

I installed a plain new SME 6.0 final server und used this script. Afterwards it told me 6.0.1-01 everywhere and I found no difference between the RPM lists. Only on ssh login, I saw a "Welcome to Mitel Networks SME Server" instead of "Welcome to SME Server 6.0.1-01"

As always, no guarantee, that your SME server will works afterwards.

#!/bin/sh
echo "Checking SME version..."
rpm -qa > rpmlist
IS_SME600=cat rpmlist | grep -c e-smith-release-6.0-11
if [ $IS_SME600 -ne 1 ] ; then
echo "This update only supports SME 6.0 final - Exiting..."
exit 1
fi
mkdir 601update
cd 601update
wget -nc --tries=0 -a download.log http://www.ibiblio.org/pub/Linux/distributions/smeserver/releases/6.0.1/RPMS/e-smith-base-4.14.1-16.noarch.rpm
wget -nc --tries=0 -a download.log http://www.ibiblio.org/pub/Linux/distributions/smeserver/releases/6.0.1/RPMS/e-smith-email-4.14.0-07.noarch.rpm
wget -nc --tries=0 -a download.log http://www.ibiblio.org/pub/Linux/distributions/smeserver/releases/6.0.1/RPMS/e-smith-formmagick-1.2.2-02.noarch.rpm
wget -nc --tries=0 -a download.log http://www.ibiblio.org/pub/Linux/distributions/smeserver/releases/6.0.1/RPMS/e-smith-horde-1.10.0-02.noarch.rpm
wget -nc --tries=0 -a download.log http://www.ibiblio.org/pub/Linux/distributions/smeserver/releases/6.0.1/RPMS/e-smith-hosts-1.12.0-02.noarch.rpm
wget -nc --tries=0 -a download.log http://www.ibiblio.org/pub/Linux/distributions/smeserver/releases/6.0.1/RPMS/e-smith-ldap-4.10.0-03.noarch.rpm
wget -nc --tries=0 -a download.log http://www.ibiblio.org/pub/Linux/distributions/smeserver/releases/6.0.1/RPMS/e-smith-lib-1.14.0-10.noarch.rpm
wget -nc --tries=0 -a download.log http://www.ibiblio.org/pub/Linux/distributions/smeserver/releases/6.0.1/RPMS/e-smith-lib-Tai64n-1.14.0-08.noarch.rpm
wget -nc --tries=0 -a download.log http://www.ibiblio.org/pub/Linux/distributions/smeserver/releases/6.0.1/RPMS/e-smith-lilo-1.12.0-04.noarch.rpm
wget -nc --tries=0 -a download.log http://www.ibiblio.org/pub/Linux/distributions/smeserver/releases/6.0.1/RPMS/e-smith-LPRng-1.11.0-06ewf.noarch.rpm
wget -nc --tries=0 -a download.log http://www.ibiblio.org/pub/Linux/distributions/smeserver/releases/6.0.1/RPMS/e-smith-manager-1.10.0-02.noarch.rpm
wget -nc --tries=0 -a download.log http://www.ibiblio.org/pub/Linux/distributions/smeserver/releases/6.0.1/RPMS/e-smith-mysql-1.10.0-02.noarch.rpm
wget -nc --tries=0 -a download.log http://www.ibiblio.org/pub/Linux/distributions/smeserver/releases/6.0.1/RPMS/e-smith-release-6.0.1-01.noarch.rpm
wget -nc --tries=0 -a download.log http://www.ibiblio.org/pub/Linux/distributions/smeserver/releases/6.0.1/RPMS/e-smith-support-1.4.4-04.noarch.rpm
wget -nc --tries=0 -a download.log http://www.ibiblio.org/pub/Linux/distributions/smeserver/releases/6.0.1/RPMS/initscripts-6.67-1es25.i386.rpm
wget -nc --tries=0 -a download.log http://www.ibiblio.org/pub/Linux/distributions/smeserver/releases/6.0.1/RPMS/samba-2.2.8a-2cb.i386.rpm
wget -nc --tries=0 -a download.log http://www.ibiblio.org/pub/Linux/distributions/smeserver/releases/6.0.1/RPMS/samba-client-2.2.8a-2cb.i386.rpm
wget -nc --tries=0 -a download.log http://www.ibiblio.org/pub/Linux/distributions/smeserver/releases/6.0.1/RPMS/samba-common-2.2.8a-2cb.i386.rpm
rpm -Uvh *.rpm
cd ..
/sbin/e-smith/signal-event post-upgrade
echo "The server needs to reboot, press any key"
read answer
reboot

--------------

Please report any errors, so that I can update the
V3 update script on the documentation site.

Stefan

adam_w

smeplus errors
« Reply #5 on: November 29, 2004, 08:27:31 PM »
Can anyone tell me why i get an output of the following when i try to run the smeplus script?

____________________________________________________
[root@***** scripts]# sh smeplus.sh
: command not found
: command not found
: command not found

If you'd like you can log the output of this script for review later:
Before typing 'sh smeplus.sh' type 'script smeplus.log'
...and after the script is complete type 'exit'

You can hit CTRL+C now if you want to stop and do that
...or press any key to continue

': not a valid identifier
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
Downloading files...Please be patient, 100MB? of downloads
[-----------------------]
: command not found
: command not found
: command not found
: command not found
: command not found
___________________________________________________

any help would be great!

Thanks in advance.[/u]

cydonia

Version 3 of unofficial update script
« Reply #6 on: November 29, 2004, 10:18:39 PM »
Could i use this script on a 6.0.1 that is in use?

Any problems people have experienced to look out for?


I don't really have a testing server at the moment so i will have to deploy it onto my production one.

Offline gregswallow

  • *
  • 651
  • +1/-0
Version 3 of unofficial update script
« Reply #7 on: November 29, 2004, 11:05:39 PM »
Quote from: "stefan24"
I created an update script for SME 6.0 (final) to a SME 6.0.1-01.

Could you make a new wiki page for that - just so the two don't get confused.

Quote from: "stefan24"
I either would not use /root/plus, but leave all paths relative to the pwd.

Why?  I don't understand what you mean.
Quote from: "stefan24"

I also added in my version
 - a ping check for existance of www.contribs.org,
 - a check for SME 6.0.1-01,
 - a question, if the optional contribs should be downloaded and installed
 -  and a optional e-mail to me, if there are download errors in the script (not stable until now)

Sounds cool - can you share the check for 6.0.1-01 code with us - or pop it into the Wiki page.  The email is cool - just don't make the emails go to me too :-P  I get enough!  I was going to put in an optional section - but I thought people can just comment out the parts they don't want, I just thought I'd leave it all so everyones contribs get tested together.
Quote from: "stefan24"

But I like your download status bar. <g>

Thanks :-)

Offline stefan24

  • ****
  • 483
  • +0/-0
    • www.sme-server.de
Re: smeplus errors
« Reply #8 on: November 30, 2004, 08:29:04 AM »
Quote from: "adam_w"
Can anyone tell me why i get an output of the following when i try to run the smeplus script?
____________________________________________________
[root@***** scripts]# sh smeplus.sh
: command not found
: command not found
: command not found
[...]


You transfered the script to the SME server with a Binary method, so that Windows CR/LF are used instead of the unix LF. Using a ASCII or Text method while transfering the script would solve that problem.

This problem is one point, where I would prefer a script (like the PHP, SpamFilter or AntiVirus scripts), which could be downloaded via wget directly on the server without the requirement to extract it from a client and move it to the SME server.

Offline stefan24

  • ****
  • 483
  • +0/-0
    • www.sme-server.de
Version 3 of unofficial update script
« Reply #9 on: November 30, 2004, 09:06:05 AM »
Quote
Quote
I created an update script for SME 6.0 (final) to a SME 6.0.1-01.

Could you make a new wiki page for that - just so the two don't get confused.


I intended to include my new script in your script, so that even users with SME 6.0 can update to the latest version. But maybe I just test for existance of SME 6.0 final and direct them to the new wiki page!?

Quote
Quote
I either would not use /root/plus, but leave all paths relative to the pwd.

Why?


I don't like to install the updates in /root/..., but in a directory /Install. So I could start the script in /Install and it will put all RPMs there (and leave them there) Furthermore I tested the download script from a Windows client, and after renaming it to .BAT, it downloaded all files when using relative paths.
Just for the case, the SME Server has no direct internet connection (rare case, I know) or someone wants to make a CD-ROM for updating customer's SME servers. But I know, that the other scripts (AV, SpamFilter, PHP, MySQL) require an online connection, too.

Quote

can you share the check for 6.0.1-01 code with us - or pop it into the Wiki page.


OK.

Offline gregswallow

  • *
  • 651
  • +1/-0
Version 3 of unofficial update script
« Reply #10 on: November 30, 2004, 06:37:12 PM »
Quote from: "stefan24"
I intended to include my new script in your script, so that even users with SME 6.0 can update to the latest version. But maybe I just test for existance of SME 6.0 final and direct them to the new wiki page!?


Oh, I didn't understand that's what you wanted to do - sounds good (to include it), but do you think there will be problems if people have a modified 6.0 server and they use this script?  Go for it, but I think if you do that you should put a warning to back up first, or backup and restore onto a test server and try the upgrade on that first.

Offline stefan24

  • ****
  • 483
  • +0/-0
    • www.sme-server.de
Version 3 of unofficial update script
« Reply #11 on: December 01, 2004, 10:12:15 AM »
Quote from: "gregswallow"
do you think there will be problems if people have a modified 6.0 server and they use this script?


Sure, could be, but I think there are many 6.00 / 6.01 installations which has not been modified in any way.

Look at my new message screen in the wiki. We could add a suggestion for backing up the data before the update.

I just don't know, if the server has to be rebooted after updating from 6.0 to 6.01. I'll try that later.

BTW: Don't install a SME 6.0 final, if SME 6.01 is already installed on the hard disk. Anaconda will stop with errors.

Offline kohne

  • 4
  • +0/-0
Version 3 of unofficial update script
« Reply #12 on: December 01, 2004, 02:44:14 PM »
I did not test the latest greates all-integrated script yet, but I have some issues with the earlier scripts:

This e-smith server is used as gateway for another mailserver (mercury on Novell). This works great, as all mail is filtered for virusses en spam before it reaches the Novell server.

However, there are some issues in this scenario:

-mailblocking is blocking all users not known as local. Which is in this case about everybody, because the userlist (100+) and their aliasses are only maintained on the Novell server, not on e-smith. I had to adjust the mail-blocking rules for that. (And I screwed up, so for a day the server was misused by some bloke from taiwan as open relay  :-(
-the spamfilter does tag the mail, but does not get rid of it. This also relies on local users, with procmail.

Just to take into consideration.

P

Offline compdoc

  • ****
  • 211
  • +0/-0
Version 3 of unofficial update script
« Reply #13 on: December 03, 2004, 02:45:56 AM »
adam_w, are you editing the script (copy/pasting, etc) in windows, then uploading to the SME server? If so, that’s causing the problem.

Its tricky converting text back and forth sometimes. There are linefeeds and hidden text that screws it up. Id recommend first creating the file using pico while SSH’d into SME.

After the file is created properly, you can then open and edit the files with notepad or wordpad correctly thru SSH.

You may have to try a few ways to get it right...

Offline compdoc

  • ****
  • 211
  • +0/-0
Version 3 of unofficial update script
« Reply #14 on: December 03, 2004, 03:19:23 PM »
On running the script, I get several warnings:

warning: user duke does not exist - using root

Which brings up the point - some contribs have reports that are emailed to root, which in SME at least, does not have a mailbox. Any easy way to correct this?


Also, there is a warning to change the password for MySQL:

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h entrance password 'new-password'


The first command is accepted, the second command is not:

/usr/bin/mysqladmin: connect to server at 'servername' failed
error: 'Host 'servername.domain.com' is not allowed to connect to this MySQL server'

(I've changed the server & domain name to protect the innocent) Is this a big problem if the first password was changed? Or should I get the 2nd command to work?