e-smith-backup/createlinks

87 lines
2.5 KiB
Plaintext
Raw Permalink Normal View History

#!/usr/bin/perl -w
#----------------------------------------------------------------------
# Copyright 1999-2005 Mitel Networks Corporation
# This program is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.
#----------------------------------------------------------------------
# This script creates the symlinks needed by this RPM
# Specific support exists to create symlinks within e-smith web "panels"
# and for links from named "events" directories into the "actions" directory
use esmith::Build::CreateLinks qw(:all);
#--------------------------------------------------
# functions for manager panel
#--------------------------------------------------
my $panel = "manager";
panel_link("backup", $panel);
#--------------------------------------------------
# events for bootstrap-console-save
#--------------------------------------------------
$event = "bootstrap-console-save";
event_link("reset-restore-idle-flag", $event, "95");
templates2events("/etc/dar/CIFScredentials", $event);
#--------------------------------------------------
# events for conf-backup action
#--------------------------------------------------
$event = "conf-backup";
templates2events("/etc/crontab", $event);
templates2events("/etc/dar/CIFScredentials", $event);
templates2events("/etc/dar/DailyBackup.dcf", $event);
#--------------------------------------------------
# events for pre-backup action
#--------------------------------------------------
$event = "pre-backup";
templates2events("/etc/dar/DailyBackup.dcf", $event);
#--------------------------------------------------
# events for rewind-tape action
#--------------------------------------------------
foreach $event (qw(restore-tape pre-backup post-backup))
{
event_link("rewind-tape", $event, "50");
}
foreach $event (qw(post-backup))
{
event_link("eject-tape", $event, "90");
}
#--------------------------------------------------
foreach $event (qw(pre-restore))
{
event_link("save-system-files", $event, "10");
event_link("delete-index-htm", $event, "80");
}
#--------------------------------------------------
foreach $event (qw(post-upgrade))
{
event_link("merge-system-files", $event, "00");
}
foreach $event (qw(restore-tape))
{
event_link("restore-from-disk", $event, "40");
}
#--------------------------------------------------
$event="e-smith-backup-update";
event_link("merge-system-files", $event, "00");
templates2events("/etc/crontab", $event);
templates2events("/etc/dar/CIFScredentials", $event);
templates2events("/etc/dar/DailyBackup.dcf", $event);