File: body_init.pl

package info (click to toggle)
tct 1.07-9
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,828 kB
  • ctags: 1,128
  • sloc: perl: 9,604; ansic: 4,861; makefile: 516; sh: 77
file content (22 lines) | stat: -rw-r--r-- 729 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#
# just a little stub that puts headers in the body & body.S files
#

sub body_init {

die "Can't open $body.S (in grave_robber_init())\n" unless open(BODY, ">$body.S");
print BODY "class|host|start_time\n";
print BODY "body|$hostname|" . time . "\n";
print BODY "md5|file|st_dev|st_ino|st_mode|st_ls|st_nlink|st_uid|st_gid|st_rdev|st_size|st_atime|st_mtime|st_ctime|st_blksize|st_blocks\n";
close(BODY);

die "Can't open $body (in grave_robber_init())\n" unless open(BODY, ">$body");
print BODY "class|host|start_time\n";
print BODY "body|$hostname|" . time . "\n";
print BODY "md5|file|st_dev|st_ino|st_mode|st_ls|st_nlink|st_uid|st_gid|st_rdev|st_size|st_atime|st_mtime|st_ctime|st_blksize|st_blocks\n";
close(BODY);

}

1;