diff --git a/etc/init/BUILD.gn b/etc/init/BUILD.gn index 06b5632..9a1c292 100755 --- a/etc/init/BUILD.gn +++ b/etc/init/BUILD.gn @@ -16,7 +16,11 @@ import("//build/ohos.gni") ################################################################################ ohos_prebuilt_etc("timeservice.rc") { - source = "timeservice.rc" + if (use_musl) { + source = "timeservice.cfg" + } else { + source = "timeservice.rc" + } relative_install_dir = "init" part_name = "time_native" subsystem_name = "miscservices" diff --git a/etc/init/timeservice.cfg b/etc/init/timeservice.cfg new file mode 100644 index 0000000..01a4b67 --- /dev/null +++ b/etc/init/timeservice.cfg @@ -0,0 +1,30 @@ +# Copyright (C) 2021 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +{ + "jobs" : [{ + "name" : "boot", + "cmds" : [ + "start time_service" + ] + } + ], + "services" : [{ + "name" : "time_service", + "path" : ["/system/bin/sa_main", "/system/profile/time_service.xml"], + "uid" : "system", + "gid" : ["system", "shell"], + "caps" : ["SYS_TIME"] + } + ] +}