summaryrefslogtreecommitdiffstats
path: root/po/zh_CN.po
diff options
context:
space:
mode:
authorPablo Saratxaga <pablo@mandriva.com>2002-04-08 09:35:13 +0000
committerPablo Saratxaga <pablo@mandriva.com>2002-04-08 09:35:13 +0000
commit45e2a74e8801f40a2c1c4c95312f50c91bce6368 (patch)
treefd54b165afd2407da21d421981466a5d0630ab29 /po/zh_CN.po
parent8125de88341df07224d42c750849242cbd2c29ca (diff)
downloadmgaonline-45e2a74e8801f40a2c1c4c95312f50c91bce6368.tar
mgaonline-45e2a74e8801f40a2c1c4c95312f50c91bce6368.tar.gz
mgaonline-45e2a74e8801f40a2c1c4c95312f50c91bce6368.tar.bz2
mgaonline-45e2a74e8801f40a2c1c4c95312f50c91bce6368.tar.xz
mgaonline-45e2a74e8801f40a2c1c4c95312f50c91bce6368.zip
updated pot file
Diffstat (limited to 'po/zh_CN.po')
-rw-r--r--po/zh_CN.po108
1 files changed, 56 insertions, 52 deletions
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 8f1f4abe..f9d44035 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: mdkonline 0.15\n"
-"POT-Creation-Date: 2002-03-11 11:25+0100\n"
+"POT-Creation-Date: 2002-04-08 11:35+0200\n"
"PO-Revision-Date: 2001-03-04 10:30+0800\n"
"Last-Translator: Danny Zeng <danny@zeng.com.cn>\n"
"Language-Team: Simplified Chinese <zh@li.org>\n"
@@ -13,84 +13,85 @@ msgstr ""
"Content-Type: text/plain; charset=gb2312\n"
"Content-Transfer-Encoding: 8bit\n"
-#: mdkonline:71
+#: mdkonline:69
msgid "Africa"
msgstr "非洲"
-#: mdkonline:72
+#: mdkonline:70
msgid "Asia"
msgstr "亚洲"
-#: mdkonline:73
+#: mdkonline:71
msgid "Australia"
msgstr "澳洲"
-#: mdkonline:74
+#: mdkonline:72
msgid "Europe"
msgstr "欧洲"
-#: mdkonline:75
-msgid "USA"
-msgstr "美国"
+#: mdkonline:73
+#, fuzzy
+msgid "North America"
+msgstr "南美"
-#: mdkonline:76
+#: mdkonline:74
msgid "South America"
msgstr "南美"
-#: mdkonline:97 mdkonline:215 mdkonline:248
+#: mdkonline:94 mdkonline:213 mdkonline:246
msgid "Next"
msgstr "下一步"
-#: mdkonline:98
+#: mdkonline:95
msgid "Finish"
msgstr "完成"
-#: mdkonline:99 mdkonline:548
+#: mdkonline:96 mdkonline:536
msgid "Quit"
msgstr "退出"
-#: mdkonline:100 mdkonline:216 mdkonline:250 mdkonline:252
+#: mdkonline:97 mdkonline:214 mdkonline:248 mdkonline:250
msgid "Back"
msgstr "上一步"
-#: mdkonline:102
+#: mdkonline:99
msgid "I don't have a MandrakeOnline account and I want to "
msgstr "我没有 MandrakeOnline 帐户, 我要"
-#: mdkonline:103
+#: mdkonline:100
msgid "Subscribe"
msgstr "预定"
-#: mdkonline:119
+#: mdkonline:116
msgid "Yes I want automated updates"
msgstr "是, 我要自动更新"
-#: mdkonline:164
+#: mdkonline:162
msgid "Quitting Wizard\n"
msgstr "正在退出帮助\n"
-#: mdkonline:262
+#: mdkonline:260
msgid "Warning: No browser specified"
msgstr "警告: 没有指定浏览器"
-#: mdkonline:289
+#: mdkonline:287
#, fuzzy
msgid "Connecting ...\n"
msgstr "连接问题"
-#: mdkonline:297 mdkonline:360
+#: mdkonline:295 mdkonline:358
msgid "Connection problem"
msgstr "连接问题"
-#: mdkonline:297 mdkonline:360
+#: mdkonline:295 mdkonline:358
msgid "MandrakeOnline could not be contacted, please try again at a later time"
msgstr "无法连接到 MandrakeOnline, 请稍后再试"
-#: mdkonline:309
+#: mdkonline:307
msgid "Wrong password"
msgstr "口令错误"
-#: mdkonline:309
+#: mdkonline:307
msgid ""
"Your login or password was wrong.\n"
" Either you'll have to type it again, or you'll need to create an account on "
@@ -105,11 +106,11 @@ msgstr ""
" 如果需要创建帐户, 请回到第一步, 连接 MandrakeOnline.\n"
" 请注意您必须提供一个机器名(只能包含字母)"
-#: mdkonline:368
+#: mdkonline:366
msgid "Welcome to MandrakeOnline"
msgstr "MandrakeOnline 欢迎您"
-#: mdkonline:369
+#: mdkonline:367
msgid ""
"At this step You are supposed to have an account on MandrakeOnline [1].\n"
"This assistant will help you to upload your configuration\n"
@@ -121,35 +122,35 @@ msgstr ""
"上传到中心数据库\n"
"这样我们可以及时通知您有关的安全升级和有用的更新.\n"
-#: mdkonline:386
+#: mdkonline:384
msgid "Mandrake Privacy Policy"
msgstr "Mandrake 隐私保护政策"
-#: mdkonline:391
+#: mdkonline:389
msgid "Authentification"
msgstr "认证"
-#: mdkonline:392
+#: mdkonline:390
msgid "Enter your MandrakeOnline login, password and machine name:"
msgstr "请输入您的 MandrakeOnline 登录名, 口令和机器名:"
-#: mdkonline:394
+#: mdkonline:392
msgid "Login:"
msgstr "登录名:"
-#: mdkonline:394
+#: mdkonline:392
msgid "Password:"
msgstr "口令:"
-#: mdkonline:394
+#: mdkonline:392
msgid "Machine name:"
msgstr "机器名:"
-#: mdkonline:398
+#: mdkonline:397
msgid "Sending your Configuration"
msgstr "发送您的配置"
-#: mdkonline:399
+#: mdkonline:398
msgid ""
"In order to benefit from MandrakeOnline services,\n"
"we are about to upload your configuration.\n"
@@ -181,11 +182,11 @@ msgstr ""
"另外, 您将以优惠价格在 www.mandrakeexpert.com 得到收费的支持.\n"
"最后, 我们将提供给你如下的 email 转发地址: your.username\\@mandrakeonline.net"
-#: mdkonline:407
+#: mdkonline:406
msgid "Error while sending informations"
msgstr "发送信息出错"
-#: mdkonline:408
+#: mdkonline:407
msgid ""
"There was an error while sending your personal informations.\n"
"\n"
@@ -195,15 +196,15 @@ msgstr ""
"\n"
"要重新尝试发送您的配置, 请选择 '下一步' "
-#: mdkonline:414
+#: mdkonline:413
msgid "Finished"
msgstr "完成"
-#: mdkonline:415
+#: mdkonline:414
msgid "Your upload was successful!"
msgstr "您已经成功发送"
-#: mdkonline:415
+#: mdkonline:414
msgid ""
"From now you will receive on security\n"
"and updates announcements thanks to MandrakeOnline."
@@ -211,45 +212,45 @@ msgstr ""
"今后您将收到来自 MandrakeOnline 的\n"
"安全及升级通知."
-#: mdkonline:415
+#: mdkonline:414
msgid "MandrakeOnline offers you the ability to automate the updates."
msgstr "MandrakeOnline 为您提供自动升级的能力"
-#: mdkonline:415
+#: mdkonline:414
msgid "A program will run regulary in your system waiting for new updates\n"
msgstr "您的系统会定期的运行一个程序, 查找新的升级\n"
-#: mdkonline:420
+#: mdkonline:419
msgid "automated Upgrades"
msgstr "自动升级"
-#: mdkonline:431
+#: mdkonline:426
msgid "Choose your geographical location"
msgstr "选择您的地理位置"
-#: mdkonline:463
+#: mdkonline:444
#, fuzzy
msgid "Reading configuration\n"
msgstr "发送您的配置"
-#: mdkonline:490
+#: mdkonline:471
#, c-format
msgid "cannot open this file for read: %s"
msgstr "无法打开这个文件进行读取: %s"
-#: mdkonline:523
+#: mdkonline:511
msgid "OK"
msgstr "确定"
-#: mdkonline:529 mdkonline:555
+#: mdkonline:517 mdkonline:543
msgid "-adobe-times-bold-r-normal--14-*-100-100-p-*-iso8859-*,*-r-*"
msgstr "-adobe-times-bold-r-normal--14-*-100-100-p-*-iso8859-*,*-r-*"
-#: mdkonline:544
+#: mdkonline:532
msgid "Cancel"
msgstr "取消"
-#: mdkonline:553
+#: mdkonline:541
msgid ""
"Do you really want to abort MandrakeOnline?\n"
"To return to the Wizard press 'Cancel',\n"
@@ -259,21 +260,24 @@ msgstr ""
"要回到程序请选择 '取消',\n"
"要退出请选择 '退出'. "
-#: mdkonline:557
+#: mdkonline:545
msgid "Really abort? - MandrakeOnline"
msgstr "真的要退出? - MandrakeOnline"
-#: mdkonline:635
+#: mdkonline:623
msgid "-adobe-times-bold-r-normal--17-*-100-100-p-*-iso8859-*,*-r-*"
msgstr "-adobe-times-bold-r-normal--17-*-100-100-p-*-iso8859-*,*-r-*"
-#: mdkonline:636
+#: mdkonline:624
msgid "Welcome"
msgstr "欢迎"
-#: mdkonline:660
+#: mdkonline:648
msgid "Close"
msgstr "关闭"
+#~ msgid "USA"
+#~ msgstr "美国"
+
#~ msgid "Your personal informations are now stored at MdkOnline"
#~ msgstr "MdkOnline 现在保存了您的个人信息"
pan> It can also be used for shutting down the machine when the battery is low."), atd => N_("Runs commands scheduled by the at command at the time specified when at was run, and runs batch commands when the load average is low enough."), crond => N_("cron is a standard UNIX program that runs user-specified programs at periodic scheduled times. vixie cron adds a number of features to the basic UNIX cron, including better security and more powerful configuration options."), cups => N_("Common UNIX Printing System (CUPS) is an advanced printer spooling system"), dm => N_("Launches the graphical display manager"), fam => N_("FAM is a file monitoring daemon. It is used to get reports when files change. It is used by GNOME and KDE"), gpm => N_("GPM adds mouse support to text-based Linux applications such the Midnight Commander. It also allows mouse-based console cut-and-paste operations, and includes support for pop-up menus on the console."), haldaemon => N_("HAL is a daemon that collects and maintains information about hardware"), harddrake => N_("HardDrake runs a hardware probe, and optionally configures new/changed hardware."), httpd => N_("Apache is a World Wide Web server. It is used to serve HTML files and CGI."), inet => N_("The internet superserver daemon (commonly called inetd) starts a variety of other internet services as needed. It is responsible for starting many services, including telnet, ftp, rsh, and rlogin. Disabling inetd disables all of the services it is responsible for."), ipchains => N_("Launch packet filtering for Linux kernel 2.2 series, to set up a firewall to protect your machine from network attacks."), keytable => N_("This package loads the selected keyboard map as set in /etc/sysconfig/keyboard. This can be selected using the kbdconfig utility. You should leave this enabled for most machines."), kheader => N_("Automatic regeneration of kernel header in /boot for /usr/include/linux/{autoconf,version}.h"), kudzu => N_("Automatic detection and configuration of hardware at boot."), linuxconf => N_("Linuxconf will sometimes arrange to perform various tasks at boot-time to maintain the system configuration."), lpd => N_("lpd is the print daemon required for lpr to work properly. It is basically a server that arbitrates print jobs to printer(s)."), lvs => N_("Linux Virtual Server, used to build a high-performance and highly available server."), messagebus => N_("DBUS is a daemon which broadcasts notifications of system events and other messages"), named => N_("named (BIND) is a Domain Name Server (DNS) that is used to resolve host names to IP addresses."), netfs => N_("Mounts and unmounts all Network File System (NFS), SMB (Lan Manager/Windows), and NCP (NetWare) mount points."), network => N_("Activates/Deactivates all network interfaces configured to start at boot time."), nfs => N_("NFS is a popular protocol for file sharing across TCP/IP networks. This service provides NFS server functionality, which is configured via the /etc/exports file."), nfslock => N_("NFS is a popular protocol for file sharing across TCP/IP networks. This service provides NFS file locking functionality."), ntpd => N_("Synchronizes system time using the Network Time Protocol (NTP)"), numlock => N_("Automatically switch on numlock key locker under console and Xorg at boot."), oki4daemon => N_("Support the OKI 4w and compatible winprinters."), pcmcia => N_("PCMCIA support is usually to support things like ethernet and modems in laptops. It will not get started unless configured so it is safe to have it installed on machines that do not need it."), portmap => N_("The portmapper manages RPC connections, which are used by protocols such as NFS and NIS. The portmap server must be running on machines which act as servers for protocols which make use of the RPC mechanism."), postfix => N_("Postfix is a Mail Transport Agent, which is the program that moves mail from one machine to another."), random => N_("Saves and restores system entropy pool for higher quality random number generation."), rawdevices => N_("Assign raw devices to block devices (such as hard drive partitions), for the use of applications such as Oracle or DVD players"), routed => N_("The routed daemon allows for automatic IP router table updated via the RIP protocol. While RIP is widely used on small networks, more complex routing protocols are needed for complex networks."), rstatd => N_("The rstat protocol allows users on a network to retrieve performance metrics for any machine on that network."), rusersd => N_("The rusers protocol allows users on a network to identify who is logged in on other responding machines."), rwhod => N_("The rwho protocol lets remote users get a list of all of the users logged into a machine running the rwho daemon (similar to finger)."), saned => N_("SANE (Scanner Access Now Easy) enables to access scanners, video cameras, ..."), smb => N_("The SMB/CIFS protocol enables to share access to files & printers and also integrates with a Windows Server domain"), sound => N_("Launch the sound system on your machine"), sshd => N_("Secure Shell is a network protocol that allows data to be exchanged over a secure channel between two computers"), syslog => N_("Syslog is the facility by which many daemons use to log messages to various system log files. It is a good idea to always run syslog."), usb => N_("Load the drivers for your usb devices."), xfs => N_("Starts the X Font Server."), xinetd => N_("Starts other deamons on demand."), ); my ($name) = @_; my $s = $services{$name}; if ($s) { $s = translate($s); } else { my $file = find { -e $_ } map { "$::prefix$_/$name" } '/etc/rc.d/init.d', '/etc/init.d', '/etc/xinetd.d'; $s = cat_($file); $s =~ s/\\\s*\n#\s*//mg; $s = $s =~ /^#\s+(?:Short-)?[dD]escription:\s+(.*?)^(?:[^#]|# {0,2}\S)/sm ? $1 : $s =~ /^#\s*(.*?)^[^#]/sm ? $1 : ''; $s =~ s/#\s*//mg; } $s =~ s/\n/ /gm; $s =~ s/\s+$//; $s; } sub ask_ { my ($in) = @_; my %root_services = ( N("Printing") => [ qw(cups cupslpd lpr lpd oki4daemon hpoj cups-lpd) ], N("Internet") => [ qw(httpd boa tux roxen ftp pftp tftp proftpd wu-ftpd pure-ftpdipsec proftpd-xinetd ipchains iptables ip6tables ipvsadm isdn4linux ibod jabber jabber-icq adsl squid portsentry prelude nessusd junkbuster radvd cddbp ippl iptoip jail.init) ], N("File sharing") => [ qw(nfs-common nfs-server nfslock smb nettalk netfs mcserv autofs amd venus.init auth2.init codasrv.init update.init swat) ], N("System") => [ qw(usb usbd pcmcia irda xinetd inetd kudzu harddrake apmd sound network xfs alsa functions halt kheader killall mandrake_everytime mandrake_firstime random rawdevices single keytable syslog crond medusa-init portmap rpcbind acon anacron atd gpm psacct wine acpid numlock jserver sensors mosix bpowerd bpowerfail fcron powertweak.init ups syslog-ng cvs apcupsd) ], N("Remote Administration") => [ qw(sshd telnetd telnet rsh rlogin rexec webmin cfd heartbeat ldirectord iplog mon vncserver netsaint olympusd drakxtools_http) ], # N("Network Client") => [ qw(ypbind nscd arpwatch fetchmail dnrd_rc diald rsync) ], # N("Network Server") => [ qw(named bootparamd ntpd xntpd chronyd postfix sendmail # imap imaps ipop2 ipop3 pop3s routed yppasswdd ypserv ldap dhcpd dhcrelay # hylafax innd identd rstatd rusersd rwalld rwhod gated # kadmin kprop krb524 krb5kdc krb5server hldsld bayonne sockd dhsd gnu-pop3d # gdips pptpd.conf vrrpd crossfire bnetd pvmd ircd sympa finger ntalk talk) ], N("Database Server") => [ qw(mysql postgresql) ], ); my %services_root; foreach my $root (keys %root_services) { $services_root{$_} = $root foreach @{$root_services{$root}}; } my ($l, $on_services) = services(); my %services; $services{$_} = 0 foreach @{$l || []}; $services{$_} = 1 foreach @{$on_services || []}; $in->ask_browse_tree_info(N("Services"), N("Choose which services should be automatically started at boot time"), { node_state => sub { $services{$_[0]} ? 'selected' : 'unselected' }, build_tree => sub { my ($add_node, $flat) = @_; $add_node->($_, !$flat && ($services_root{$_} || N("Other"))) foreach sort keys %services; }, grep_unselected => sub { grep { !$services{$_} } @_ }, toggle_nodes => sub { my ($set_state, @nodes) = @_; my $new_state = !$services{$nodes[0]}; foreach (@nodes) { $set_state->($_, $new_state ? 'selected' : 'unselected'); $services{$_} = $new_state; } }, get_status => sub { N("Services: %d activated for %d registered", scalar(grep { $_ } values %services), scalar(values %services)); }, get_info => sub { formatLines(description($_[0])) }, interactive_help => sub { interactive::gtk::display_help($in, { interactive_help_id => 'misc-params#drakxid-configureServices' }, $::main_window) }, }) or return $l, $on_services; #- no change on cancel. [ grep { $services{$_} } @$l ]; } sub ask_standalone_gtk { my ($_in) = @_; my ($l, $on_services) = services(); my @xinetd_services = map { $_->[0] } @{(services_raw())[1]}; require ugtk2; ugtk2->import(qw(:wrappers :create)); my $W = ugtk2->new(N("Services")); my ($x, $y, $w_popup); my $nopop = sub { $w_popup and $w_popup->destroy; undef $w_popup }; my $display = sub { my ($text) = @_; $nopop->(); gtkshow(gtkadd($w_popup = Gtk2::Window->new('popup'), gtksignal_connect(gtkadd(Gtk2::EventBox->new, gtkadd(gtkset_shadow_type(Gtk2::Frame->new, 'etched_out'), gtkset_justify(Gtk2::Label->new($text), 'left'))), button_press_event => sub { $nopop->() } )))->move($x, $y) if $text; }; my $update_service = sub { my ($service, $label) = @_; my $started = -e "/var/lock/subsys/$service"; $label->set_label($started ? N("running") : N("stopped")); }; my $b = Gtk2::EventBox->new; $b->set_events('pointer_motion_mask'); gtkadd($W->{window}, gtkadd($b, gtkpack_($W->create_box_with_title, 0, mygtk2::gtknew('Title1', label => N("Services and daemons")), 1, gtkset_size_request(create_scrolled_window(create_packtable({ col_spacings => 10, row_spacings => 3 }, map { my $service = $_; my $is_xinetd_service = member($service, @xinetd_services); my $infos = warp_text(description($_), 40); $infos ||= N("No additional information\nabout this service, sorry."); my $label = gtkset_justify(Gtk2::Label->new, 'left'); $update_service->($service, $label) if !$is_xinetd_service; [ gtkpack__(Gtk2::HBox->new(0,0), $_), gtkpack__(Gtk2::HBox->new(0,0), $label), gtkpack__(Gtk2::HBox->new(0,0), gtksignal_connect(Gtk2::Button->new(N("Info")), clicked => sub { $display->($infos) })), gtkpack__(Gtk2::HBox->new(0,0), gtkset_active(gtksignal_connect( Gtk2::CheckButton->new($is_xinetd_service ? N("Start when requested") : N("On boot")), clicked => sub { if ($_[0]->get_active) { push @$on_services, $service if !member($service, @$on_services); } else { @$on_services = grep { $_ ne $service } @$on_services; } }), member($service, @$on_services))), map { my $a = $_; gtkpack__(Gtk2::HBox->new(0,0), gtksignal_connect(Gtk2::Button->new(translate($a)), clicked => sub { my $action = $a eq "Start" ? 'restart' : 'stop'; log::explanations(qq(GP_LANG="UTF-8" service $service $action)); # as we need the output in UTF-8, force it local $_ = `GP_LANG="UTF-8" service $service $action 2>&1`; s/\033\[[^mG]*[mG]//g; c::set_tagged_utf8($_); $update_service->($service, $label); $display->($_); })) if !$is_xinetd_service; } (N_("Start"), N_("Stop")) ]; } @$l), [ $::isEmbedded ? 'automatic' : 'never', 'automatic' ]), -1, $::isEmbedded ? -1 : 400), 0, gtkpack(gtkset_border_width(Gtk2::HBox->new(0,0),5), $W->create_okcancel) )) ); $b->signal_connect(motion_notify_event => sub { my ($w, $e) = @_; my ($ox, $oy) = $w->window->get_origin; $x = $e->x+$ox; $y = $e->y+$oy }); $b->signal_connect(button_press_event => sub { $nopop->() }); $::isEmbedded and gtkflush(); $W->main or return; $on_services; } sub ask { my ($in) = @_; !$::isInstall && $in->isa('interactive::gtk') ? &ask_standalone_gtk : &ask_; } sub _set_service { my ($service, $enable) = @_; my $script = "/etc/rc.d/init.d/$service"; run_program::rooted($::prefix, "chkconfig", $enable ? "--add" : "--del", $service); #- FIXME: handle services with no chkconfig line and with no Default-Start levels in LSB header if ($enable && cat_("$::prefix$script") =~ /^#\s+chkconfig:\s+-/m) { run_program::rooted($::prefix, "chkconfig", "--level", "35", $service, "on"); } } sub _run_action { my ($service, $action) = @_; run_program::rooted($::prefix, "/etc/rc.d/init.d/$service", $action); } sub doit { my ($in, $on_services) = @_; my ($l, $was_on_services) = services(); foreach (@$l) { my $before = member($_, @$was_on_services); my $after = member($_, @$on_services); if ($before != $after) { _set_service($_, $after); if (!$after && !$::isInstall && !$in->isa('interactive::gtk')) { #- only done after install AND when not using the gtk frontend (since it allows one to start/stop services) #- this allows to skip stopping service "dm" _run_action($_, "stop"); } } } } sub services_raw() { local $ENV{LANGUAGE} = 'C'; my (@services, @xinetd_services); foreach (run_program::rooted_get_stdout($::prefix, '/sbin/chkconfig', '--list')) { if (my ($xinetd_name, $on_off) = m!^\t(\S+):\s*(on|off)!) { push @xinetd_services, [ $xinetd_name, $on_off eq 'on' ]; } elsif (my ($name, $l) = m!^(\S+)\s+(0:(on|off).*)!) { push @services, [ $name, [ $l =~ /(\d+):on/g ] ]; } } \@services, \@xinetd_services; } #- returns: #--- the listref of installed services #--- the listref of "on" services sub services() { my ($services, $xinetd_services) = services_raw(); my @l = @$xinetd_services; if ($::isInstall) { push @l, map { [ $_->[0], @{$_->[1]} > 0 ] } @$services; } else { my $runlevel = (split " ", `/sbin/runlevel`)[1]; push @l, map { [ $_->[0], member($runlevel, @{$_->[1]}) ] } @$services; } @l = sort { $a->[0] cmp $b->[0] } @l; [ map { $_->[0] } @l ], [ map { $_->[0] } grep { $_->[1] } @l ]; } sub service_exists { my ($service) = @_; -x "$::prefix/etc/rc.d/init.d/$service"; } sub restart ($) { my ($service) = @_; # Exit silently if the service is not installed service_exists($service) or return 1; _run_action($service, "restart"); } sub restart_or_start ($) { my ($service) = @_; # Exit silently if the service is not installed service_exists($service) or return 1; _run_action($service, is_service_running($service) ? "restart" : "start"); } sub start ($) { my ($service) = @_; # Exit silently if the service is not installed service_exists($service) or return 1; _run_action($service, "start"); } sub start_not_running_service ($) { my ($service) = @_; # Exit silently if the service is not installed service_exists($service) or return 1; is_service_running($service) || _run_action($service, "start"); } sub stop ($) { my ($service) = @_; # Exit silently if the service is not installed service_exists($service) or return 1; _run_action($service, "stop"); } sub is_service_running ($) { my ($service) = @_; # Exit silently if the service is not installed service_exists($service) or return 1; run_program::rooted($::prefix, "/etc/rc.d/init.d/$service", '>', '/dev/null', '2>', '/dev/null', "status"); } sub starts_on_boot { my ($service) = @_; my (undef, $on_services) = services(); member($service, @$on_services); } sub start_service_on_boot ($) { my ($service) = @_; _set_service($service, 1); } sub do_not_start_service_on_boot ($) { my ($service) = @_; _set_service($service, 0); } sub enable { my ($service, $o_dont_apply) = @_; start_service_on_boot($service); restart_or_start($service) unless $o_dont_apply; } sub disable { my ($service, $o_dont_apply) = @_; do_not_start_service_on_boot($service); stop($service) unless $o_dont_apply; } sub set_status { my ($service, $enable, $o_dont_apply) = @_; if ($enable) { enable($service, $o_dont_apply); } else { disable($service, $o_dont_apply); } } 1;