Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
54f4ed6b
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
54f4ed6b
编写于
16年前
作者:
G
Guido Günther
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
logrotate qemu monitor logs
上级
1c9968a2
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
37 addition
and
3 deletion
+37
-3
ChangeLog
ChangeLog
+8
-0
qemud/Makefile.am
qemud/Makefile.am
+13
-1
qemud/libvirtd.logrotate.in
qemud/libvirtd.logrotate.in
+8
-0
src/qemu_driver.c
src/qemu_driver.c
+8
-2
未找到文件。
ChangeLog
浏览文件 @
54f4ed6b
Tue 9 Dez 2008 21:08:43 CET Guido Günther <agx@sigxcpu.org>
logrotate qemu monitor logs
* src/qemu_driver.c: open logfile O_APPEND instead of O_TRUNC when
running as root
* qemud/Makefile.am: install logrotate configuration (by Harald Sraub)
and create logdir
Mon Dec 8 13:22:06 +0100 2008 Jim Meyering <meyering@redhat.com>
virsh.c: tweak options to produce more accurate help
...
...
This diff is collapsed.
Click to expand it.
qemud/Makefile.am
浏览文件 @
54f4ed6b
...
...
@@ -134,7 +134,8 @@ endif
default_xml_dest
=
libvirt/qemu/networks/default.xml
install-data-local
:
install-init install-data-sasl install-data-polkit
install-data-local
:
install-init install-data-sasl install-data-polkit
\
install-logrotate
mkdir
-p
$(DESTDIR)$(sysconfdir)
/libvirt/qemu/networks/autostart
$(INSTALL_DATA)
$(srcdir)
/default-network.xml
\
$(DESTDIR)$(sysconfdir)
/
$(default_xml_dest)
...
...
@@ -198,6 +199,17 @@ remote_dispatch_ret.h: $(srcdir)/remote_generate_stubs.pl remote_protocol.x
perl
-w
$(srcdir)
/remote_generate_stubs.pl
-r
$(srcdir)
/remote_protocol.x
>
$@
libvirtd.logrotate
:
libvirtd.logrotate.in
sed
\
-e
s!
\@
localstatedir
\@
!
@localstatedir@!g
\
<
$<
>
$@
-t
mv
$@
-t
$@
install-logrotate
:
libvirtd.logrotate
mkdir
-p
$(DESTDIR)$(localstatedir)
/log/libvirt/qemu/
mkdir
-p
$(DESTDIR)$(sysconfdir)
/logrotate.d/
$(INSTALL_DATA)
$<
$(DESTDIR)$(sysconfdir)
/logrotate.d/libvirtd
if
LIBVIRT_INIT_SCRIPTS_RED_HAT
install-init
:
libvirtd.init
mkdir
-p
$(DESTDIR)$(sysconfdir)
/rc.d/init.d
...
...
This diff is collapsed.
Click to expand it.
qemud/libvirtd.logrotate.in
0 → 100644
浏览文件 @
54f4ed6b
@localstatedir@/log/libvirt/qemu/*.log {
daily
missingok
rotate 7
compress
delaycompress
copytruncate
}
This diff is collapsed.
Click to expand it.
src/qemu_driver.c
浏览文件 @
54f4ed6b
...
...
@@ -841,6 +841,8 @@ static int qemudStartVMDaemon(virConnectPtr conn,
unsigned
int
qemuCmdFlags
;
fd_set
keepfd
;
const
char
*
emulator
;
uid_t
uid
=
geteuid
();
mode_t
logmode
;
FD_ZERO
(
&
keepfd
);
...
...
@@ -884,8 +886,12 @@ static int qemudStartVMDaemon(virConnectPtr conn,
return
-
1
;
}
if
((
vm
->
logfile
=
open
(
logfile
,
O_CREAT
|
O_TRUNC
|
O_WRONLY
,
S_IRUSR
|
S_IWUSR
))
<
0
)
{
logmode
=
O_CREAT
|
O_WRONLY
;
if
(
uid
!=
0
)
logmode
|=
O_TRUNC
;
else
logmode
|=
O_APPEND
;
if
((
vm
->
logfile
=
open
(
logfile
,
logmode
,
S_IRUSR
|
S_IWUSR
))
<
0
)
{
qemudReportError
(
conn
,
NULL
,
NULL
,
VIR_ERR_INTERNAL_ERROR
,
_
(
"failed to create logfile %s: %s"
),
logfile
,
strerror
(
errno
));
...
...
This diff is collapsed.
Click to expand it.
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录
新手
引导
客服
返回
顶部