当我apt-get update在 ubuntu 17.10 上运行时,收到以下错误:
E: Repository 'http://ppa.launchpad.net/ondrej/php/ubuntu artful InRelease' changed its 'Label' value from '*****
The main PPA for PHP (5.6, 7.0, 7.1) with many PECL extensions *****' to '*****
The main PPA for supported PHP versions with many PECL extensions *****'
N: This must be accepted explicitly before updates for this repository can be applied.
See apt-secure(8) manpage for details."
Run Code Online (Sandbox Code Playgroud)
手册页并没有真正指向解决方案。我的问题是,我如何明确接受更改?
我的网络中有两台服务器,我将一些数据从一台服务器传输到另一台服务器。我编写了一个脚本来完成此任务,当我手动运行它时它工作得很好。但是,当我将其包含在 crontab 中以便自动化该过程时,即使脚本运行,它也不会挂载外部服务器。我向日志发送尽可能多的信息,但是没有报告安装错误,只是没有连接。
这是脚本:
#!/bin/bash
LOGFILE="/var/log/SRV1.log"
echo $(date +%Y-%m-%d_%H:%M:%S)" --- Begins Now" | tee -a ${LOGFILE}
StartTime="$(date +%s)"
echo "Connecting to SRV1" | tee -a ${LOGFILE}
mount.cifs //192.168.1.200/share /media/SVR1 -o user=username,pass=pwd | tee -a ${LOGFILE}
Run Code Online (Sandbox Code Playgroud)
该文件由 root:root 拥有,拥有 755 权限。(我知道我可以加强这一点,但是,我仍在尝试)。