diff --git a/scripts/build-image-common.sh b/scripts/build-image-common.sh index 6be1f1d5fad18484427849215a29e33873686784..884fc44114223c642f6e105b50b0423f7a2f2fef 100644 --- a/scripts/build-image-common.sh +++ b/scripts/build-image-common.sh @@ -467,10 +467,10 @@ make_rootfs(){ cp ${repo_file} ${rootfs_dir}/etc/yum.repos.d/tmp.repo set +e INSTALL_PACKAGES $CONFIG_RPM_LIST - cat ${rootfs_dir}/etc/systemd/timesyncd.conf | grep "^NTP*" + cat ${rootfs_dir}/etc/systemd/timesyncd.conf | grep "^NTP=*" if [ $? -ne 0 ]; then - sed -i 's/#NTP=/NTP=0.cn.pool.ntp.org/g' ${rootfs_dir}/etc/systemd/timesyncd.conf - sed -i 's/#FallbackNTP=/FallbackNTP=1.asia.pool.ntp.org 2.asia.pool.ntp.org/g' ${rootfs_dir}/etc/systemd/timesyncd.conf + sed -i -e '/^#NTP=/cNTP=0.cn.pool.ntp.org' ${rootfs_dir}/etc/systemd/timesyncd.conf + sed -i -e '/^#FallbackNTP=/cFallbackNTP=1.asia.pool.ntp.org 2.asia.pool.ntp.org' ${rootfs_dir}/etc/systemd/timesyncd.conf fi set -e cp ${euler_dir}/hosts ${rootfs_dir}/etc/hosts diff --git a/scripts/build-image.sh b/scripts/build-image.sh index dfec1a3d30668751652827d73c7921ca66b17025..495a2c0e3da6c0af988d166b4a6067e5488ff2cb 100644 --- a/scripts/build-image.sh +++ b/scripts/build-image.sh @@ -247,10 +247,10 @@ make_rootfs(){ dnf --installroot=${rootfs_dir}/ makecache set +e INSTALL_PACKAGES $CONFIG_RPM_LIST - cat ${rootfs_dir}/etc/systemd/timesyncd.conf | grep "^NTP*" + cat ${rootfs_dir}/etc/systemd/timesyncd.conf | grep "^NTP=*" if [ $? -ne 0 ]; then - sed -i 's/#NTP=/NTP=0.cn.pool.ntp.org/g' ${rootfs_dir}/etc/systemd/timesyncd.conf - sed -i 's/#FallbackNTP=/FallbackNTP=1.asia.pool.ntp.org 2.asia.pool.ntp.org/g' ${rootfs_dir}/etc/systemd/timesyncd.conf + sed -i -e '/^#NTP=/cNTP=0.cn.pool.ntp.org' ${rootfs_dir}/etc/systemd/timesyncd.conf + sed -i -e '/^#FallbackNTP=/cFallbackNTP=1.asia.pool.ntp.org 2.asia.pool.ntp.org' ${rootfs_dir}/etc/systemd/timesyncd.conf fi set -e cp ${euler_dir}/hosts ${rootfs_dir}/etc/hosts diff --git a/scripts/config/chroot.sh b/scripts/config/chroot.sh index 52a8d1be9ffe5339f7087ede8e235ede9676a2c1..a0db52a0aff09f23e0f516c47f65f57c3f99fd56 100755 --- a/scripts/config/chroot.sh +++ b/scripts/config/chroot.sh @@ -18,7 +18,8 @@ if [ -f /etc/rc.d/rc.local ]; then fi if [ "x$1" == "xxfce" ]; then echo "user-session=xfce" >> /etc/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf - sed -i -e "/^#background=/cbackground=\/usr\/share\/backgrounds\/xfce\/xfce-blue.jpg" /etc/lightdm/lightdm-gtk-greeter.conf + sed -i -e 's/^background=/#background=/' /etc/lightdm/lightdm-gtk-greeter.conf + sed -i -e '/^#background=/cbackground=/usr/share/backgrounds/xfce/xfce-blue.jpg' /etc/lightdm/lightdm-gtk-greeter.conf elif [ "x$1" == "xdde" ]; then if id openeuler; then userdel -r openeuler