Showing posts with label gentoo. Show all posts
Showing posts with label gentoo. Show all posts

2015-08-26

BIND (named) server remidiation

Since I virtualised my old failing physical server into a VM, I have found it less and less easy to administer and maintain (read: configuration files).

So, I am looking and spinning up new Debian servers for more specific tasks, network services, games servers, file services etc.

The fist, and most important thing I need to migrate is DNS. That way I can have it simply running in parallel with the old, ready to essentially, stop the service (after making sure DHCP serves out this DNS IP address as well of course!).

Now, here comes the "clever" part or the goals of this approach (or so I thought):

  1. Install named.
  2. Configure it to be a slave for the existing zones
  3. re-configure it to be a master (complete with zone files)

Pretty simple right? Not so much. Well, thanks be to the 'Debian' way of doing things, it was very quick and easy to have a the zones slaved, but when I went to look at the files I was expecting, they where still empty, since I had created empty zone files to begin with.

Some poking around later and I discover that it is transferring the zones fine, but there was an issue with permissions for the zone files, or more specifically, the directory where they lived. A quick chmod -R 0777 /zone/file/directory later and a restart of the service, voila! Except.... something was not right...

The zone files seemed to be in a binary format as file would have me believe they were of type: data

I could have converted them back to plain text using the bind-tool named-compilezone(8) but, I couldn't commit my time to learning how to get the syntax correct for one small job, besides I learned that it is a crazy default in order to get a performance increase, however minuscule that would be given such a small DNS server implementation (for now).

So as per the article "Bind 9.9 – Binary DNS Slave file format" (linked above) or more authoratively as per the Chapter 6. BIND 9 Configuration Reference section of the BIND 9.9 Administrator Reference Manual (ARM) which states (incorrectly):

masterfile-format
Specifies the file format of zone files (see the section called “Additional File Formats”). The default value is text, which is the standard textual representation, except for slave zones, in which the default value is raw. Files in other formats than text are typically expected to be generated by the named-compilezone tool, or dumped by named.

So, knowing this I edited /etc/bind/named.conf.options to include the following:

masterfile-format text;

Perfect. (Just like me ;-) I now have a duplicate of the zones served on the master server, which can, and will soon be decommissioned, not to mention the new servers zones getting a makeover with many many more zones as well as a dynamic-update zone - more to come on this soon.

2011-03-10

mirgating to libata

Since IDE/MFM/RLL is now depreciated, I thought I'd share my experiences of migrating to the newer libsata (SATA prod) drivers in 2.6 kernel.

Since I only have 2 devices on IDE ports (WD 320Gb HDD and a cdrw), there was very little for me to do as I had just about everything spread across both ata and libsata, so I removed all instances of ata, set built-in ATA driver support (since the system boots from IDE - for now) under libsata and enabled what I needed as modules for my SATA JBOD's

The whole thing almost went perfectly as planned (and as documented), except for the following minor irritations:

  1. Forgot to change the real_root option in grub.conf from /dev/hda3 to /dev/sda3 :-P
  2. udev was naming my cdrom to cdrw1/cdrom1

Admittedly, it took my a while figure out that I forgot to change the bootloader for the change in device names, but I quickly worked out how to change the cdrom device name back to default, by editing "/etc/udev/rules.d/70-persistent-cd.rules"

2009-03-10

internets anew

Thanks to this article I was able to transform my crappy dg632 router into a dumb modem so that I could get better control (including better security) on my internet link.

The only problems I encountered was that I found it difficult to set the router into bridged mode, but finally found the answer here. The documentation on the gentoo wiki differed slightly too, in that the iptables exported variable for the WAN interface should be ppp0 instead of eth1.

Other than that I can now enjoy a properly firewalled, dyndns capable and port-forwarding capable setup at no extra cost.

Now all I need to do is get bind, ldap and openvpn working... having all this free time without a job does have it's benefits...

2009-02-17

kde4

KDE4 finally hit stable in gentoo's portage! *woohoo!* (as of about a month ago :P)

I had to wait a few weeks so that package blocks got sorted out in portage (well, at least now there is only 2 rather than the 4 from last week), which just goes to show that immediately trying to update to anything isn't always a good idea! :P

so now the dell xps is chugging away at building all the kde packages and dependencies (as well as updates from about 4 weeks ago) etc etc and hopefully when I wake up tomorrow I will be greeted with a shiny slick new KDM :)

I really should be updating my diary-blog but I wanted to keep a record of the fact that I have figured out that waiting for sane dependency handling by portage updates is a good thing!

2008-11-29

moar storage

I acquired two more 1Tb HDD's effectively making my current total storage space about 4Tb.

I want to software raid my 1Tb disks, but I need a silent UPS before I can (this system sits in my room, so I don't it waking me or anyone else if the power drops during the night), so my server is going to have to stay JBOD for now *sigh*

I am also contemplating putting Vista (x64) onto my lappy to make it easier for work, but I can't bear to loose my Gentoo/KDE after all the hard work that I have done in getting it functional.

I need to make some hard decisions here...

Also, I will hopefully get around to implementing IPTABLES + bridged mode modem + pppoe on my fileserver soon :)

2008-06-27

2Tb of goodness

So I finally shelled out (about ~$400+) for some more storage capacity (2 x 1Tb WD HDD). I was planning on buying a brand new fileserver ($2.5K worth) and doing software raid across them, but due to the cost of recovering from the car incident, I decided to do this on the cheap (JBOB). So now I have about 2Tb of storage at my disposal until I can afford the 10Tb fileserver (RAID6) *grin*

2008-06-15

dmix

After many changes in my USE flags (alsa/arts) and the fact that I kept breaking my audio (NWN would have no sound, wine kept blocking other apps from accessing the audio harware and many other problematic things), I finally got a working dmixed (and arts free) audio setup *yay*.

This is how I (FINALLY) fixed it:

  1. Created a working /etc/asound.conf (see bellow) and restart alsasound.

  2. Removed arts altogether in favour of alsa (USE="-arts alsa") in /etc/make.conf, ran emerge -NDv world

  3. while tired="true"; do; sleep 8h; done

  4. Restarted X (/etc/init.d/xdm restart).

...and now I have dmix (which now works with wine!!!)!

Here is my /etc/asound.conf

pcm.dmixed {
ipc_key 1025
type dmix
slave.pcm "hw:0,0"
}

#one called "dsnooped" for capturing
pcm.dsnooped {
ipc_key 1027
type dsnoop
slave.pcm "hw:0,0"
}

#and this is the real magic
pcm.asymed {
type asym
playback.pcm "dmixed"
capture.pcm "dsnooped"
}

#a quick plug plugin for above device to do the converting magic
pcm.!default {
type plug
slave.pcm "asymed"
}

#a ctl device to keep xmms happy
ctl.pasymed {
type hw
card 0
}

#for aoss:
pcm.dsp0 {
type plug
slave.pcm "asymed"
}

ctl.mixer0 {
type hw
card 0
}

And as you can see in the screenshot below, you can see wine (foobar2000) using the dmix plug as it's output device :)



NOTE: Step 3 (sleeping) is optional :P

2008-05-08

VMPlayer Anoyances

Here's something that I discovered whilst trying to figure out why I could only start some VM's and not others on an ntfs3g volume.

# cat ntfs3g.txt
If you are running your Virtual Machine on an ntfs3g formatted volume and you encounter the following error:

VMware Player unrecoverable error: (vcpu-0)
Failed to allocate page for guest RAM!
A log file is available in "vmname.log". Please request support and include the contents of the log file.
To collect data to submit to VMware support, run "vm-support".
We will respond on the basis of your support entitlement.

Try adding the following line to your VMX (configuration file):

mainMem.useNamedFile=FALSE

NOTE: replace vmname with the name of your Virtual Machine.

I found this out from the following VMware Communities forum thread here

2008-04-24

Adventures in Open Source (Part 2)

Welcome to Part 2 of Adventures in Open Source!

This post is continuation on the previous article Adventures in Open Source (Part 1). In this post I will give you even more Tips, Tricks and useful information about Linux open source applications and their uses.

dellBiosUpdate
As the name suggests, dellBiosUpdate (which is provided by libsmbios) is tool for updating a Dell BIOS in linux. This came about because one day, I noticed an unanswered and unread post on forums.gentoo.org titled Dell BIOS update: extract_hdr, and I decided to investigate/research this because I also wanted to know if it was possible to flash your BIOS under Linux. I then found out (Thanks to the likes of the the Gentoo unofficial wiki post, HOWTO Dell BIOS Upgrade) that I don't even need M$DOS to flash the BIOS on my M1730!


quagmire ~ #modprobe dell_rbu
quagmire ~ # dellBiosUpdate -t -f system_bios_ven_0x1028_dev_0x01f7_version_a06/bios.hdr
BIOS file matches this system and is newer.
quagmire ~ # dellBiosUpdate -u -f system_bios_ven_0x1028_dev_0x01f7_version_a06/bios.hdr
Supported RBU type for this system: (MONOLITHIC, PACKET)
Using RBU v2 driver. Initializing Driver.
Setting RBU type in v2 driver to: PACKET
writing (4096) to file: /sys/devices/platform/dell_rbu/packet_size
Writing RBU data (4096bytes/dot):
........................................................................................
........................................................................................
........................................................................................
........................................................................................
........................................................................................
........................................................................................
.............
Done writing packet data.
Activate CMOS bit to notify BIOS that update is ready on next boot.
Update staged sucessfully. BIOS update will occur on next reboot.
quagmire ~ # rmmod dell_rbu

After doing the above, It occured to me that this process is somewhat the same as when you flash in windows, as the bios data is written to a special section of the bios or EEPROM, then a "bios update" flag is set so that the system will immediately start the flash process upon reboot. Nifty eh?


SCP (SSH)
I learned that it is possible to transfer files (and folders) to/from a remote path that has one or more spaces in it!

You need to enclose the entirety of the remote hosts argument in quotes and put escape sequences into it. For example:
scp -r "/media/sdd/2008-semester1/csg2207/Unit Schedule" "remotehost:~/UNI/2008-semester1/csg2207/Unit\ Schedule"


Gentoolkit (eclean-dist)
eclean-dist (a wrapper for eclean distfiles), is a tool provided by app-portage/gentoolkit that provides easy distfile cleaning (deleting)

After searching for a solution (thanks to the powers of google), I found that the Gentoo tool exists already. It seems to do an intelligent job at checking against installed packages and removing old distfiles (or tarballs). Pretty neat :)


rsync
That's right. rsync! I haven't done much research into the differences between cvs and rsync, but it seems to be a much easier to use alternative for synchronisation of file trees (UNI, savegames, software repositories, music, movies etc.) and using openssl (ssh) as a transport mechanism with almost no effort!

Here's an example (or proof) of me synchronising a folder of uni unit to my file server:

dean@quagmire ~ $ rsync -uav /media/UNI/2008-semester1/csg2207/ dean@192.168.1.2:~/UNI/2008-semester1/csg2207
Password:
building file list ... done
Assessments/assignment2/contrib/
Assessments/assignment2/contrib/delete.me
Assessments/assignment2/tmp/
Assessments/assignment2/tmp/the sample of risk management.docx.exe
Unit Schedule/
Unit Schedule/delete.me

sent 17094 bytes received 104 bytes 6879.20 bytes/sec
total size is 45568991 speedup is 2649.67

NOTE: I have to reserve TrueCrypt for private data only, as TrueCrypt requires elevated privileges, which I don't have on most UNI computers :(


That's it for this edition! I hope this was as interesting to read as it was for me to research and discover how to use them! Feel free to drop me a line if you have any contributions or corrections. Next post irssi!

2008-04-10

Why Gentoo?

In response to Ben's Blog about the some topic, bellow is a culmination of my reasons for choosing this fantastic distribution.

Oganisation
I have found that most of the system is will organized and seems to adhere to a strict guideline of naming conventions and standards of which, most are documented on the official Gentoo documentation or the Unofficial Wiki

Minimalistic Approach
I have learned allot (more) about Linux in general since I started using this distribution. It's stage 3 install process not only seems like a "Linux from Scratch" but with this method you can install a base system for less disk cost that the latest Windows® Vista™ Service pack...

Configurability
The ability to configure everything with text files is pretty mush a norm for any Linux distribution, but Gentoo has an edge in this area, as there are many command-line tools to assist with configuration such as: etc-update, rc-update, euse, equery, eselect and (lets not forget the almighty) emerge.

Genkernel is also a winner in my books too.

Sane (Simple) Package management
Emerge for me is by far the most powerful and easiest to use (once you understand the do's and don'ts) package management that I have ever come across. Being able to have packages a tweaked to my architecture, pre-configured and all dependencies met by typing one command is very important aspect for me.

Apart from these reasons above, I still stand most of my old arguments from a while back.

2008-03-23

Adventures in Open Source (Part 1)

Welcome to the "Adventures in Open Source Series"!

Since buying my Dell XPS M1730, I have been using Gentoo Linux on it exclusively and with surprisingly good results, however I have also learned allot more about certain open source software package in general, so here I will outline some of the these (and also some of the failures) that I've experienced so far.

Screen
I have learned to use screen in a much more powerful way than ever before. Until now I was not aware of screen's configuration file capabilities, so had never used it. I found that not only can you make screen automagically setup all your screens for you, but you can also do some awesome console customisation as well (see my ~/.screenrc bellow).


screen -t default
screen -t "compile (emerge)"
screen -t config
screen -t rtorrent rtorrent
screen -t misc
hardstatus alwayslastline
hardstatus string '%{= kG}%-Lw%{= kW}%50> %n%f* %t%{= kG}%+Lw%< %{= kG}%-=%c:%s%{-}'

Here is a picture of what it looks like:

PS: This is actually in use on my fileserver (also a Gentoo box), hence the different hostname.

TrueCrypt
Since I almost lost my band new 8Gb USB mass storage device at UNI last week, I have decided to start using cryptography, so I remembered reading a planet.gentoo.org article about it and considering I am using Linux at home and Windows *shudder* Vista at UNI, I thought I would give this a try, Not just for portability and security but for any easy backup mechanism also (all I have to backup/synchronise one single file rather than managing lots of files and folders).

I followed the guide on the Gentoo Wiki here, and created a new volume now all I have to do is mount it and it's all there!

dean@quagmire ~ $ truecrypt -u /media/UNI/uni-2008-semester1.dat /media/UNI/uni
Enter password for '/media/UNI/uni-2008-semester1.dat':
dean@quagmire ~ $ ls -alh /media/UNI/uni
total 24K
drwx------ 6 dean dean 4.0K 1970-01-01 08:00 .
drwxr-xr-x 4 dean root 4.0K 1970-01-01 08:00 ..
drwx------ 6 dean dean 4.0K 2008-03-23 12:30 csg2207
drwx------ 7 dean dean 4.0K 2008-03-23 12:30 csg3308
drwx------ 7 dean dean 4.0K 2008-03-23 12:30 csi2102
drwx------ 7 dean dean 4.0K 2008-03-23 12:30 csi3207

And of course here's the proof that it's all working:

dean@quagmire ~ $ mount |grep -i truecrypt
/dev/mapper/truecrypt0 on /media/UNI/uni type vfat (rw,uid=1000,gid=1000,umask=077)
dean@quagmire ~ $

Wine
Well, as you may or may not be aware, my wine success has been pretty hit and miss (more like miss when it comes to M$ products and games), but this is due to the fact that wine is considered to be in perpetual development and the fact that I am trying to run proprietary software on a non-native platform *wink*

VirtualBox OSE
Alright, I must admit that I had an issue with this piece of software, but once I got it working it ran like a dream... I've been able to install Windows XP and (of course) Gentoo into Virtual Machines with no hassles whatsoever!



So it seems that I am not only more productive with a powerful Linux desktop, but I am also a much happier computer user as a whole even with the few "glitches" the arise every now and again.

If you learned something, enjoyed reading this article or have anything to contribute (or correct) ,feel free to leave feedback as comments on this post.


Coming soon: "Adventures in Open Source (Part 2)"!

2008-02-26

Gentoo GNU/Linux on Dell XPS M1730 (Part 2)

I have made significant progress on this project and have decided to continue with my findings so far.

I fixed the sound problem. Seems that snd-hda-intel was broken in alsa-1.0.14 (from kernel 2.6.20 - 2.5.22). I simply emerged the latest kernel, and now it works! even with surround!!

Next up I got TwinView working (finally). Seems that the nvidia driver thinks that my LCD (2702WFP) is a CRT, so I plugged in a DVI-VGA converter on the notebooks DVI port and hooked the LCD up via VGA (DB15 - DB15) cable and now she works. Interestingly enough, TwinView uses a form of xinerama, so all I had to do to stop getting a desktop stretched across both screens (and apps placed between both monitors), was to add USE="xinerama" into make.conf and re-emerged everything (emerge -uDavN) and now the WM detects the boundaries between displays!!!

TODO List
Wireless: I have installed ipw3945, but according to the Gentoo Wiki ipw3945 Hardware Article, it seems that iwlwifi is both newer and easier to implement and it will be available in gentoo-sources-2.4.24, but since it's masked, I'm reluctant to use it.

Software Suspend (to disk): This will be very important especially when using this beast at UNI. As I mentioned above, the 2.6.24 kernel has iwlwifi inbuilt, but I realised that the tuxonice-sources is at 2.4.24 (masked) so why not "kill two birds with one stone"?

TavelRemote: Since I also use this system to watch stuff (on the 27" monitor), it would be nice to be able to utilise lirc with the travel remote.

g15 GamePanel: According to some users, it's possible to use this via the g15tools, but it is low priority for me, since I use this thing as desktop-like system, where I can't even see the damn thing :P

MultiMedia Keys: This is yet another low-priority job. I will tinker again with xmodmap and app support to see if I can get it working in the future.

Who needs Microsoft® Windows™? Not me!


UPDATE: 26/02/2008 @ 1353
I discovered that the g15 Gamepanel is now working!
I had the g15daemon and libg15 stuff emerged a while back but I never noticed it working until now (I suspect the the newer kernel-2.6.23 has made a difference).

2008-01-03

I miss my KDE...

Since I'm stuck up north on yet another shift I'm beginning to have withdrawals from some of the nifty little features that makes KDE so awesome. Stuff like temporary focus-grabbing on the Kmix dock icon (being able to adjust the volume without having to change window focus is very neat... now that I realise it's missing :P ) and virtual desktops... by default!

I forgot to mention (until now) that I managed to get sound working on the XPS M1730 although doing so confirmed my suspicions somewhat. It seems that alsa in the latest kernel has broken snd-hda-intel (stac92xx) support.

I Still haven't gotten WiFi working yet either (ran out of time last RDO due to Portal), so this beast is glued to the one (hot) spot in the house for now. Maybe this heat will force me to get wifi working so that I can enjoy some nice cool aircond offered in the lounge room?

2007-11-29

Gentoo GNU/Linux on Dell XPS M1730

So I just received my brand new M1730 from Dell and since Dell sent a 32bit version of Windows Vista I have decided to decline the Windows Vista EULA, opt for a refund/credit and install Gentoo on it instead.

Heres how I did it (this is not intended as a howto).

First of all I ghosted (both) installed HDD's for the factory configuration (in case I had to restore for some reason).

Next I slid the good 'ol Gentoo 2007.0 LiveDVD into the DVD drive and proceeded to boot the machine with a one-time boot option (F12) but after trying many different versions and arch types I finally resorted to the amd64 LiveDVD which seemed to do the trick (except iiNet's rsync mirror seems to be borked).

Once I installed the base system it was as easy as doing a normal install except for the following options that I added to /etc/make.conf

CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
MAKEOPTS="-j3"

I was intending to use suspend2-sources as this is a laptop and it would be nice to be able to suspend/resume this beast between UNI and home (suspend2-sources are patched with both genpatches which includes the patches found in gentoo-sources, and Software Suspend 2 which is a new and improved implementation of suspend-to-disk for the Linux kernel¹) but unfortunately its masked for the amd64 arch.

About the only problem I encountered (other than accidentally trying to use the wrong arch for the stage3) was the CONFIG_PHYSICAL_START option in the default kernel configuration, as it was set to 10000. As per this webpage, I edited the .config and set it to 20000 and then the kernel happily compiled (I even have 32bit emulation too!).

All I need to do now is emerge xorg, wine/cedega, firefox and openoffice, then configure suspend2 (tuxonice), dual monitors and all the other niggly little laptop features on this thing (like aux LCD, mic sense jack, media buttons and wifi) :P

I will try to remember to post as I get devices working on this beast.

UPDATE: 07/12/2007 @ 1336
I managed to get output on the DVI interface in single link mode, but the resolution is all wrong (way too small)! It is either an xorg.conf MetaMode miss configuration or the latest nvidia drivers are borked...

2007-09-22

GWN Contributions

Well, I have finally decided to contribute to my favourite OS!

I have sent an email to the gwn-feedback team to see if I can help by writing articles for them every so often. If accepted, I will write-up about planet.gentoo.org blogs and maybe even Gentoo Press related articles ^_^

I just hope this this doesn't take up too much of my time like these blogs of mine :P

2007-08-18

CIFS and Windows Server 2003

Today I had an incident this morning (which, as of the time of writing this, I am still working on) where a Windows XP machine decided to BSOD with the UNMOUNTABLE_BOOT_VOLUME.

Doesn't surprise me to see that the KB article above won't help me fix this issue as I found out a few hours later that there was a power surge from the night before!!!

So to fix this I (naturally) fired up a Linux distro (this time it was Knoppix

Next up I begin receiving this error when trying to connect to mapped network drives for storage of the recovered data using smbmount(8)...

    cli_negprot: SMB signing is mandatory
4650: protocol negotiation failed
SMB connection failed

Well, after about 5 minutes of pulling my hair out while googling for a solution, I found the answer!!! CIFS! I thought that smbmount(8) was broken (I've had some bad experience in the past) however it seems that if if you use CIFS instead it will happily connect to a Windows 2003 Server file share!!

Now if only I could get all this data recovered :P

Time to call Dell for a replacement HDD (gotta love their support) and purchase one in the interim...

2007-06-19

3G4Linux

Since I can't get broadband in my dormitory up north, I have decided to go halves for the cost of Telstra 3G Wireless Broadband with a workmate of mine. Problem is this. I refuse to put ANY windows machine onto the internet without a free (and fully functional) open source firewall solution.

So I decided to look (again) at windows-based free open source firewall software and here it is! WIPFW. If it's truly based on OpenBSD's pf, it sounds very promising. (yes I'm a big OpenBSD fan). It has a very experimental GUI, but I don't necessarily need it.

Acording to this article I think it might actually be a better idea to just buy a Motium MPC-210 Mobility PC (or equivalent cheap but small machine) for use as a (Gentoo) Linux firewall for this thing. Probem is, I have have never used iptables before :P

2007-05-21

Breaking My Gentoo

After much deliberation and scouring the net for a Linux command-line based passwordsafe (and ompatible with Counterpane's Password Safe) program, I found pwsafe.

This seems like the ideal app that I had in mind, problem is it's not masked or even in portage!
Not to worry! Gentoo Sunrise has come to my rescue!

There is an overlay for it that seems like it's in the process of being reviewed, however it hasn't got a maintainer (this is probably the reason why it's not in portage yet).

Now I am wondering if I should just add it and install it using the once off ACCEPT_KEYWORDS="~x86" use flag and hope that it doesn't kill my system.
I already have the masked version of Hamachi installed how can this be any different?

I think I will end up installing yet another masked package :P

/crazy

2007-04-23

CD Backup Script (Updated)

Bellow is an updated version of my CD backup script that I developed a while back:



#!/bin/sh
#
version="1.5.5"
version_date="Mon Oct 30 15:59:14 WST 2006"
version_author="Dean Bergin (dean.bergin@gmail.com)"
version_desc="A basic automated CD backup script"

master()
{
# initiate a variable to hold the iso filename as a sting
iso_filename=backup-`date +%Y%m%d`.iso
# Check for existance of an iso with the same datestamp
# and rename acordingly
if [ -f /u1/${iso_filename} ]
then
mv /u1/${iso_filename} /u1/old.${iso_filename}
mkisofs -v -J -V backup -A '' -N -sysid '' -o /u1/$iso_filename $backup_dir
else
# TODO: Add more checking to see if the files we have for
# a backup will fit onto a CD

# If all is fine then go ahead and make the iso
mkisofs -v -J -V backup -A '' -N -sysid '' -o /u1/$iso_filename $backup_dir
chmod 0740 $iso_filename

fi
}

archive()
{
# Initialise a list of directories to include in the backup cycle
dirlist="/boot /etc /root /tmp /var"
# Dynamically create tarballs based on the directory names
for dirname in $dirlist
do
tar cfvz ${backup_dir}${dirname}.tgz $dirname
done
# This section deals with specific exceptions for dirictory names
# that requires additional filename formatting
tar cfvz ${backup_dir}/usr-home.tgz /usr/home
}

# Directory cleaning function that will automatically delete
# all files in the $backup_dir automatically. It is assumed that
# previous backup iso's have been performed
clean()
{
for file in `ls ${backup_dir}`
do
rm -rf $file
done
}

# Initialise $backup_dir and give it a value
backup_dir="/u1/backup"
# call the custom made functions
clean
archive
master



DISCLAMER:
This script has been tested, and works fine (on my own system).
Feel free to copy and modify this script to suit your own needs, but don't come crying to me if it doesn't work on your system! There is no warranty or any of that stuff and the above code is provided "as-is". Perhaps you should write your own scripts then you won't have to worry about all this legal stuff :)

Converted to Genkernel

Genkernel makes Admin on a Linux system easy!

In one single step (genkernel all), Genkernel can:


  • Create a (custom-built) kernel (bzImage) from the latest sources.

  • Make kernel modules and install them.

  • Include all (custom) CHOST optimisations that are set in make.conf in your kernel

  • Minimise human error (ie. manually copying a kernel bzImage and forgetting to rename it or relink it etc).


Not only but also, genkernel keeps config files in it's own directory (/usr/share/genkernel by default) so that means I never have to worry about whether I copied the previous kernel .config file from /usr/src/linux before purging older kernel sources by running: emerge -Pa gentoo-sources

I recommend Genkernel not only to newbies but also to Linux pros that want to make kernel upgrades less of a troublesome task.

/hug Gentoo

 
Google+