lilo.conf | bash


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting lilo.conf | bash
# 1  
Old 03-13-2004
lilo.conf | bash

hi i am first time here for post tread but i alredy spend some time for look what u are doing here and i think that is great....
i am very interesting in bash scripting so i now wanna make one script that is able to set up a lilo.conf on every machine
.....where script is runned.

for exemple a wanna make script so my friend can run my script
and set up his lilo.conf for view a windows/linux boot....
a also wanna set picture of my own....so its be posible to
script know where is win is he on hda1 or hdb1 etc....

i hope u understand me



2)i nedd exemples of some backups scripts

thx......keep on good work
# 2  
Old 04-03-2004
Re: lilo.conf | bash

Quote:
Originally posted by bl00d
hi i am first time here for post tread but i alredy spend some time for look what u are doing here and i think that is great....
i am very interesting in bash scripting so i now wanna make one script that is able to set up a lilo.conf on every machine
.....where script is runned.

for exemple a wanna make script so my friend can run my script
and set up his lilo.conf for view a windows/linux boot....
a also wanna set picture of my own....so its be posible to
script know where is win is he on hda1 or hdb1 etc....

i hope u understand me



2)i nedd exemples of some backups scripts

thx......keep on good work
2)
Code:
#/etc/crontab 
...... 
#m h d mo w u c 
30 6 * * * root /root/msh/daily_update__bakup.sh 
1 6 1 * * root /root/msh/monthly_base_bakup.sh 
...... 

#/root/msh/monthly_base_bakup.sh 
#!/bin/sh 
##################monthly bakup######################### 
##############create file list########################## 
echo "Start at" >> /mnt/bak/autobak/base_bak.log 2>&1 
date >> /mnt/bak/autobak/base_bak.log 2>&1 
find \ 
/ \ 
\( ! -type d \ 
-or \( -type d \ 
-and -empty \) \ 
\) \ 
-and \ 
! \( \ 
-path "/ftp/incoming/*" \ 
-or -path "/usr/ports/*" \ 
-or -path "/proc/*" \ 
-or -path "/tmp/*" \ 
-or -path "/cdrom/*" \ 
-or -path "/mnt/*" \ 
-or -path "/dist/*" \ 
-or -path "/var/run/*" \ 
\) \ 
-print \ 
> /mnt/bak/autobak/base_bak_list.txt 
#################tar and gzip################## 
tar -zcf /mnt/bak/autobak/base_bak.tar.gz \ 
-T /mnt/bak/autobak/base_bak_list.txt \ 
>> /mnt/bak/autobak/base_bak.log 2>&1 
echo "End at" >> /mnt/bak/autobak/base_bak.log 2>&1 
date >> /mnt/bak/autobak/base_bak.log 2>&1 

#/root/msh/daily_update__bakup.sh 
#!/bin/sh 
##################daily update bakup################## 
###################create file list################### 
echo "Start at" >> /mnt/bak/autobak/base_bak.log 2>&1 
date >> /mnt/bak/autobak/base_bak.log 2>&1 
find \ 
/ \ 
\( -newer /mnt/bak/autobak/base_bak_list.txt \) \ 
-and \ 
\( ! -type d \ 
-or \( -type d \ 
-and -empty \) \ 
\) \ 
-and \ 
! \( \ 
-path "/ftp/incoming/*" \ 
-or -path "/usr/ports/*" \ 
-or -path "/proc/*" \ 
-or -path "/tmp/*" \ 
-or -path "/cdrom/*" \ 
-or -path "/mnt/*" \ 
-or -path "/dist/*" \ 

-or -path "/var/run/*" \ 
\) \ 
-print \ 
> /mnt/bak/autobak/update_bak_list.txt 
###################bak old tar files################## 
mv /mnt/bak/autobak/update_bak.tar.gz1 \ 
/mnt/bak/autobak/update_bak.tar.gz2 \ 
>> /mnt/bak/autobak/update_bak.log 2>&1 
mv /mnt/bak/autobak/update_bak.tar.gz \ 
/mnt/bak/autobak/update_bak.tar.gz1 \ 
>> /mnt/bak/autobak/update_bak.log 2>&1 
#####################tar and gzip##################### 
tar -zcf /mnt/bak/autobak/update_bak.tar.gz \ 
-T /mnt/bak/autobak/update_bak_list.txt \ 
>> /mnt/bak/autobak/update_bak.log 2>&1 
echo "End at" >> /mnt/bak/autobak/base_bak.log 2>&1 
date >> /mnt/bak/autobak/base_bak.log 2>&1

Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

Configure resolv.conf and nsswitch.conf

Hi, I've installed Solaris 11.3(live media) and configured DNS. Everytime I reboot the server, resolv.conf got deleted and it created a new nsswitch.conf. I used below to configure both settings: # svccfg -s dns/client svc:/network/dns/client> setprop config/nameserver = (xx.xx.xx.aa... (1 Reply)
Discussion started by: flexihopper18
1 Replies

2. Shell Programming and Scripting

Script to update rsyslog.conf and auditd.conf

Hello all, Newbie here. I'm currently tasked with updating rsyslog.conf and auditd.conf on a large set of servers. I know the exact logging configurations that I want to enable. I have updated both files on on a server and hope to use the updated files as a template for the rest of the... (3 Replies)
Discussion started by: Mide
3 Replies

3. Shell Programming and Scripting

Preview of a bash conf file

(solved,sry) Heyas I'd like to give a little preview of an existing conf file, but not showing comments or empty lines. Sadly, either the output style is wrong, or not all values are printed. My current issue is, that the first variable read (var) contains both, the first and the second... (2 Replies)
Discussion started by: sea
2 Replies

4. Linux

Bash to append domain in search field of resolv.conf after vpnc connection in Linux

After vpn connection,I am not able to resolve any machines in remote gateway.It looks like remote domain is added to domain field instead of adding it to the Search field in /etc/resolv.conf I want the remote domain to add to search field along with local domain.Can anyone tell a bash or script... (2 Replies)
Discussion started by: jeremy_brett
2 Replies

5. Red Hat

lilo.conf for lvm

Does anyone know how to write a lilo.conf for lvm configurations. I have the devices addressed as: /dev/VolGroup00/LogVol00 / (root) /dev/VolGroup00/LogVol01 (swap) When running lilo, Error states: can't put the boot sector on logical partition 0xFD02 Would... (2 Replies)
Discussion started by: imrank27
2 Replies

6. Solaris

basic question on sd.conf and lpc.conf file

Hello Guys, Do we need to configure this file only if we add SAN disk or even if we add local disk, do we need to modify? (4 Replies)
Discussion started by: mokkan
4 Replies

7. UNIX for Advanced & Expert Users

Configuring snmpd.conf and snmptrapd.conf

HI, I want a help for Configuring snmpd.conf and snmptrapd.conf (i.e Configuring SNMP) for receiving TRAPS in my networks. I am using RHEL4.0 OS. Please tell me How I can configure above two files in a proper way and at an advanced level. Especially I am getting... (2 Replies)
Discussion started by: jagdish.machhi@
2 Replies

8. Filesystems, Disks and Memory

I need help with lilo

:confused: I've been trying to figure out what happen to Windows 2000 since I upgrade my partition of Red Hat 7.1 to 7.2. Before I even upgraded my system would dual boot both OS's now it only sees Linux in lilo. Can some one help me I'm in need of help. Can you tell me what I'm missing in my... (3 Replies)
Discussion started by: aojmoj
3 Replies

9. UNIX for Dummies Questions & Answers

Lilo

I have installed linux.. but it wont boot.. it says: "LI" and then my computer freezes.. it has worked before.. A couple of days ago, I tried to install OpenBSD.. I used the whole disk for it.. I think it's something with the MBR-settings I made in the OpenBSD installation.. How can... (1 Reply)
Discussion started by: Hamcha
1 Replies
Login or Register to Ask a Question