File: taper.001.fhs.diff

package info (click to toggle)
taper 6.9rb-5
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,444 kB
  • ctags: 1,604
  • sloc: ansic: 15,921; makefile: 248
file content (200 lines) | stat: -rw-r--r-- 8,671 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
diff -Nru8 taper-6.9ra/backup.c taper-6.9ra.debian/backup.c
--- taper-6.9ra/backup.c	Sun Jun  7 06:45:15 1998
+++ taper-6.9ra.debian/backup.c	Wed Oct  6 14:26:22 1999
@@ -648,17 +648,17 @@
 	      sprintf(tmpbuf, "B:Executing bg_backup %s %d %s %s %d %d \"%s\" %s %d",
 			log_file, log_level, cfile, fifo_name, compression, 0, exclude_compress, temp_dir, min_free);
 	      sprintf(s2, "%d", 0);
 #endif
 	      if (log_level > 3) write_log(tmpbuf);
 	      sprintf(s, "%d", compression);
 	      sprintf(s3, "%d", log_level);
 	      sprintf(s4, "%d", min_free);
-	      if (execlp("bg_backup", "bg_backup", log_file, s3, cfile, fifo_name, s, s2, exclude_compress, temp_dir, s4, NULL) == -1) {		  write_error_log("starting background backup");
+	      if (execlp("/usr/lib/taper/bg_backup", "/usr/lib/taper/bg_backup", log_file, s3, cfile, fifo_name, s, s2, exclude_compress, temp_dir, s4, NULL) == -1) {		  write_error_log("starting background backup");
 		  fdfifo = fopen(fifo_name, "w");
 		  fifo_send_no_child (fdfifo);	 /* no child! */
 		  fclose(fdfifo);
 		  exit(-1);			 /* should never get here */
 	      }
 	  }
 	  
 	  if (backup_child == -1) {
diff -Nru8 taper-6.9ra/bg_vars.c taper-6.9ra.debian/bg_vars.c
--- taper-6.9ra/bg_vars.c	Mon Aug 11 14:32:04 1997
+++ taper-6.9ra.debian/bg_vars.c	Wed Oct  6 14:26:22 1999
@@ -83,18 +83,18 @@
 WINDOW *win_main;
 
 UBYTE *comp_buffer1;				 /* compression buffer pointers */
 UBYTE *comp_buffer2;
 char *tr_buffer=NULL;				 /* transfer buffer */
 
 char log_file[MAX_FNAME]={0};			 /* log file stuff */
 int  log_level=2;
-char exclude_compress[MAX_FNAME]={".gz .gif .Z .zip .jpg .bmp"};/* files to exclude in compression */
-char temp_dir[MAX_FNAME]={"/usr/tmp"};		 /* temporary files directory */
+char exclude_compress[MAX_FNAME]={".gz .gif .Z .zip .jpg .jpeg .rpm .deb .tgz .taz .png .bz2 .tbz .mpg .mp3"};/* files to exclude in compression */
+char temp_dir[MAX_FNAME]={"/var/tmp"};		 /* temporary files directory */
 int  ovrwrite=1;
 int  max_tr_size=DEFAULT_TR_SIZE;		 /* is used for reading/writing files to/from hard disk */
 _s32 min_free=COMPRESS_MIN_FREE;
 int  min_seek=DEFAULT_MIN_SEEK;			 /* min blocks to pass before seeking */
 int  set_owner=TRUE;
 
 int lf=0;					 /* log file */
 UBYTE *cbuf;					 /* compression buffer */
diff -Nru8 taper-6.9ra/defaults.h taper-6.9ra.debian/defaults.h
--- taper-6.9ra/defaults.h	Sat May  2 14:51:41 1998
+++ taper-6.9ra.debian/defaults.h	Wed Oct  6 14:26:22 1999
@@ -25,11 +25,11 @@
 #define IDE_DEFAULT_NTAPE "/dev/nht0"
 
-#define DEFAULT_TAPER_INFO_FILES "taper_info"	 /* directory containing info files */
-#define DEFAULT_GLOBAL_PREFS "/usr/local/etc"	 /* location of global preference files */
-#define DEFAULT_PREFS "taper_prefs"		 /* default preference file name  */
-#define DEFAULT_LOG_FILE "taper_log"		 /* default log file name  */
+#define DEFAULT_TAPER_INFO_FILES "/var/lib/taper"/* directory containing info files */
+#define DEFAULT_GLOBAL_PREFS "/etc/taper/taper.prefs"/* location of global preference files */
+#define DEFAULT_PREFS ".taper.prefs"		 /* default preference file name  */
+#define DEFAULT_LOG_FILE "/var/log/taper.log"	 /* default log file name  */
 
 #define MAIL_PROG "mail"			 /* name of mail program */
-#define MAIL_TO "root"				 /* who to mail messages to */
+#define MAIL_TO "backup"			 /* who to mail messages to */
 
 #define TAPE_TYPE_ENVIRON "TAPE_TYPE"		 /* type of tape being used */
diff -Nru8 taper-6.9ra/restore.c taper-6.9ra.debian/restore.c
--- taper-6.9ra/restore.c	Sat May  2 14:51:41 1998
+++ taper-6.9ra.debian/restore.c	Wed Oct  6 14:26:22 1999
@@ -322,17 +322,17 @@
 	sprintf(l, "R:Executing bg_restore %s %d %s %d %d %d \"%s\"",
 		log_file, log_level, fifo_name, 0, ovrwrite, restore_mode, temp_dir);
 	sprintf(s2, "%d", 0);
 #endif
 	if (log_level > 3) write_log(l);
 	sprintf(s3, "%d", log_level);
 	sprintf(s4, "%d", ovrwrite);
 	sprintf(s5, "%d", restore_mode);
-	if (execlp("bg_restore", "bg_restore", log_file, s3, fifo_name, s2, s4, s5, temp_dir, NULL) == -1) {
+	if (execlp("/usr/lib/taper/bg_restore", "/usr/lib/taper/bg_restore", log_file, s3, fifo_name, s2, s4, s5, temp_dir, NULL) == -1) {
 	    write_error_log("Unable to start background restore");
 	    fclose(fopen(fifo_name, "r"));
 	    exit(-1);			 /* should never get here */
 	}
     }
     
     if ((fdfifo = fopen(fifo_name, "w")) == NULL) {/* open fifo */
 	if (restore_child) {
diff -Nru8 taper-6.9ra/taper.c taper-6.9ra.debian/taper.c
--- taper-6.9ra/taper.c	Mon Jun 29 02:58:23 1998
+++ taper-6.9ra.debian/taper.c	Wed Oct  6 14:31:05 1999
@@ -155,28 +155,24 @@
       if (set_tape_type(getenv(TAPE_TYPE_ENVIRON)) == -1)/* set tape type from environ */
         do_exit(ERROR_ILLEGAL_TAPE_TYPE);
     if (getenv(TAPE_ENVIRON))
       strcpy(tape, getenv(TAPE_ENVIRON));
 
     if (getenv(NTAPE_ENVIRON))
       strcpy(ntape, getenv(NTAPE_ENVIRON));
     
-    strcpy(log_file, getenv("HOME"));
-    strcat(log_file, "/"); 
-    strcat(log_file, DEFAULT_LOG_FILE);
+    strcpy(log_file, DEFAULT_LOG_FILE);
     if (getenv(LOGFILE_ENVIRON))
       strcpy(log_file, getenv(LOGFILE_ENVIRON));
     
     if (getenv(LOGLEVEL_ENVIRON))
       log_level = atol(getenv(LOGLEVEL_ENVIRON));
     
-    strcpy(taper_info_files, getenv("HOME"));
-    strcat(taper_info_files, "/"); 
-    strcat(taper_info_files, DEFAULT_TAPER_INFO_FILES);
+    strcpy(taper_info_files, DEFAULT_TAPER_INFO_FILES);
     if (getenv(TAPER_INFO_FILES_ENVIRON))
       strcpy(taper_info_files, getenv(TAPER_INFO_FILES_ENVIRON));
 }
 
 
 PRIVATE char evcol(char *s)
 {
 /* make color string into color integer */    
@@ -403,33 +399,35 @@
         strcpy(pref_file, getenv(PREFS_ENVIRON));
     if (!*pref_file) {				 /* no environment specified */
 	strcpy(pref_file, getenv("HOME"));
 	strcat(pref_file, "/"); 
 	strcat(pref_file, DEFAULT_PREFS);
 	fd = fopen(pref_file, "r");
 	if (fd == NULL)	{			 /* couldn't open this */
 	    strcpy(pref_file, DEFAULT_GLOBAL_PREFS); /* therefore look in global */
-	    strcat(pref_file, "/");
-	    strcat(pref_file, DEFAULT_PREFS);
 	}
 	else
 	  fclose(fd);				 /* close what we just opened */
     }
     
     if (!*pref_file) 				 /* if still no filename */
       return;
     
     if ((fd=fopen(pref_file, "r")) == NULL) {	 /* error opening config file */
 	if (errno != ENOENT)			 /* allowed to have file not found */
 	  do_exit(ERROR_CONFIGURATION);		 /* any other error */
 	else {
 	    strcpy(pref_file, getenv("HOME"));	 /* make default  */
-	    strcat(pref_file, "/"); 		 /* ~/.taper_prefs */
-	    strcat(pref_file, DEFAULT_PREFS);
+	    if (strncmp(pref_file, "/root", 5) != 0) {
+		strcat(pref_file, "/"); 	 /* ~/.taper_prefs */
+		strcat(pref_file, DEFAULT_PREFS);
+	    } else {
+		strcpy(pref_file, DEFAULT_GLOBAL_PREFS);
+	    }
 	}
 	return;
     }
     while (!feof(fd)) {				 /* find tape name preference */
 	if (fgets(s, sizeof(s), fd) == NULL) break;
 	if (!strncasecmp(s, "tape-type", strlen("tape-type")))
 	    process_pref_line(s);
     }
diff -Nru8 taper-6.9ra/vars.c taper-6.9ra.debian/vars.c
--- taper-6.9ra/vars.c	Mon Jun 29 02:58:24 1998
+++ taper-6.9ra.debian/vars.c	Wed Oct  6 14:35:08 1999
@@ -148,31 +148,31 @@
 int  append=1;
 int  auto_descend=1;
 int  soft_links=0;
 int  lstrip, ostrip=99;
 int  tape_overwrite=0;
 int  compression=2;				/* Default is internal compression */
 char archive_title[MAX_ARCHIVETITLE]={0};
 char volume_title[MAX_ARCHIVETITLE]={0};
-char exclude_files[MAX_FNAME]={".o ~"};		 /* files to exclude in archive */
-char exclude_dirs[MAX_FNAME]={"/tmp /usr/tmp /var/tmp"};/* directories to exclude in archive */
+char exclude_files[MAX_FNAME]={".o ~ core"};		 /* files to exclude in archive */
+char exclude_dirs[MAX_FNAME]={"/tmp /usr/tmp /var/tmp /home/tmp /var/lib/taper"};/* directories to exclude in archive */
 int  unattended=0;				 /* for unattended back sets */
 char rel_path[MAX_FNAME]={0};
 int  incremental=1;
 int  most_recent=1;
 int  prompt_archive=1;
 int  size_dirs=1;				 /* whether to size dirs in backup */
 _s32 pr_dir=0;
 _u32 diff_id=0;
 char taper_info_files[MAX_FNAME]={0};
 int  info_end=0;				 /* writes out info file at end of tape */
 int compress_info=1;
 int  dir_selection=0;
-int  log_file_size=2;				 /* default is 2MB */
+int  log_file_size=99;				 /* default is 99MB */
 int  org_block_size;
 dev_t proc_dev=1;				 /* device on which /proc is mounted */
 int  only_vol=0;				 /* limit restore to volume */
 int  comp_head_start=0;				 /* how much head start to give compression */
 char pref_file[MAX_FNAME];			 /* file of preference file */
 int  have_rewind=-1;
 int  have_fsf=-1;
 int  bad_checksum=1;