forum.netbsd.se - NetBSD Sweden

You are not logged in.

#1 2005-12-10 19:11:23

asemisldkfj
Member
Registered: 2005-12-06
Posts: 16

NetBSD source update script

http://hacktheplanet.homeunix.net/software/stableup.sh

I've used this script a couple times now, for updating to 2.0.3 and to 2.1 on two separate machines.  a few friends of mine have tested it to, so I've worked out a couple of bugs (OBJ_DIR not getting defined, not working in tcsh, etc.) and think I have it pretty much perfect now.

here's a short overview of what it does:

1. checks for /usr/src, /usr/tools, and /usr/obj
2. if they're not found, it asks for alternative paths, or if you want to do an initial checkout of the source tree
3. asks if you want to do a source tree, kernel, or userland update
4. tells you to reboot after whichever you choose

hope this helps some people smile.

the NetBSD updating docs are pretty out of date (I might help update them) and it's hard to remember all the commands to run every time you want to do an update.

Last edited by asemisldkfj (2005-12-10 23:11:13)

Offline

 

#2 2005-12-10 22:09:23

ceh
Member
Registered: 2004-05-10
Posts: 71

Re: NetBSD source update script

Which script?

Offline

 

#3 2005-12-10 23:10:57

asemisldkfj
Member
Registered: 2005-12-06
Posts: 16

Re: NetBSD source update script

oh geeze, I didn't even post a link to the script!

edited smile.

Offline

 

#4 2005-12-11 16:14:32

ceh
Member
Registered: 2004-05-10
Posts: 71

Re: NetBSD source update script

Looks good.

You might consider extending it with building binary sets, and add an option to choose an anonymous CVS mirror (to lower the stress on the head server), too.

Offline

 

#5 2005-12-11 20:16:49

asemisldkfj
Member
Registered: 2005-12-06
Posts: 16

Re: NetBSD source update script

yeah, I've been meaning to work on it for a while, I want to have it read from a configuration file too, but that's kind of a pain with shell scripts.  thanks for the suggestions!

Offline

 

#6 2005-12-12 08:09:17

mikael
Member
From: Stockholm, Sweden
Registered: 2004-05-11
Posts: 101

Re: NetBSD source update script

Quck and dirty solution could be:

#!/bin/sh
config="/etc/configfile.conf"
cvs_server=`cat $config | grep CVS_SERVER | awk -F '"' '{print $2}'`
echo $cvs_server

and in /etc/configfile.conf

CVS_SERVER="cvs.example.com"

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2008 PunBB