Openmediavault:dpkg --configure -a无法完成重启服务

时间:2019-07-08 07:30:02

标签: debian dpkg openmediavault

我正在Rockpi 4上安装OMV和omv-extras。当试图在webui中加载omv-extra插件时,它告诉我dpgk --configure -a需要在shell中运行。但是,它永远不会完成重启服务。任何想法,我该如何修复dpgk?

$ sudo dpkg --configure -a 
Setting up openmediavault (4.1.23-1) ...
Creating users/groups ...
Updating local package archive ...
Updating service units ...
Updating configuration database ...
Generate service configurations ...
update-initramfs: Generating /boot/initrd.img-4.4.182-rockchip64
update-initramfs: Converting to u-boot format
Configuring web server ...
Site configuration file 'default' not found.
Site configuration file 'openmediavault-webgui' is already enabled.
Restarting services ...

这是我的日记输出。

$ sudo journalctl 

Jul 08 09:12:31 rockpi kernel: wl_run_escan: LEGACY_SCAN sync ID: 7, bssidx: 0
Jul 08 09:14:31 rockpi kernel: wl_run_escan: LEGACY_SCAN sync ID: 8, bssidx: 0
Jul 08 09:15:01 rockpi CRON[6488]: pam_unix(cron:session): session opened for user root by (uid=0)
Jul 08 09:15:01 rockpi CRON[6487]: pam_unix(cron:session): session opened for user root by (uid=0)
Jul 08 09:15:01 rockpi CRON[6486]: pam_unix(cron:session): session opened for user root by (uid=0)
Jul 08 09:15:01 rockpi CRON[6490]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Jul 08 09:15:01 rockpi CRON[6489]: (root) CMD (/usr/lib/armbian/armbian-truncate-logs)
Jul 08 09:15:01 rockpi CRON[6493]: (root) CMD (/usr/sbin/omv-mkrrdgraph >/dev/null 2>&1)
Jul 08 09:15:01 rockpi CRON[6487]: pam_unix(cron:session): session closed for user root
Jul 08 09:15:04 rockpi CRON[6486]: pam_unix(cron:session): session closed for user root
Jul 08 09:15:06 rockpi systemd[1]: Starting LSB: Starts ProFTPD daemon...
Jul 08 09:15:06 rockpi proftpd[6611]: Starting ftp server: proftpd.
Jul 08 09:15:06 rockpi systemd[1]: Started LSB: Starts ProFTPD daemon.
Jul 08 09:15:06 rockpi liblogging-stdlog[855]:  [origin software="rsyslogd" swVersion="8.24.0" x-pid="855" x-info="http://www.rsyslog.com"] rsyslogd was HUPed
Jul 08 09:15:06 rockpi liblogging-stdlog[855]:  [origin software="rsyslogd" swVersion="8.24.0" x-pid="855" x-info="http://www.rsyslog.com"] rsyslogd was HUPed
Jul 08 09:15:06 rockpi CRON[6488]: pam_unix(cron:session): session closed for user root
Jul 08 09:16:31 rockpi kernel: wl_run_escan: LEGACY_SCAN sync ID: 9, bssidx: 0
Jul 08 09:17:01 rockpi CRON[6681]: pam_unix(cron:session): session opened for user root by (uid=0)
Jul 08 09:17:01 rockpi CRON[6682]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Jul 08 09:17:02 rockpi CRON[6681]: pam_unix(cron:session): session closed for user root
Jul 08 09:18:31 rockpi kernel: wl_run_escan: LEGACY_SCAN sync ID: 10, bssidx: 0
Jul 08 09:19:49 rockpi systemd[1]: Starting Cleanup of Temporary Directories...
Jul 08 09:19:49 rockpi systemd[1]: Started Cleanup of Temporary Directories.
Jul 08 09:20:31 rockpi kernel: wl_run_escan: LEGACY_SCAN sync ID: 11, bssidx: 0
Jul 08 09:22:31 rockpi kernel: wl_run_escan: LEGACY_SCAN sync ID: 12, bssidx: 0
Jul 08 09:24:31 rockpi kernel: wl_run_escan: LEGACY_SCAN sync ID: 13, bssidx: 0
Jul 08 09:24:45 rockpi sudo[6759]:  user : TTY=pts/0 ; PWD=/home/user ; USER=root ; COMMAND=/bin/journalctl -f
Jul 08 09:24:45 rockpi sudo[6759]: pam_unix(sudo:session): session opened for user root by user(uid=0)
Jul 08 09:24:53 rockpi sudo[6759]: pam_unix(sudo:session): session closed for user root
Jul 08 09:25:01 rockpi CRON[6769]: pam_unix(cron:session): session opened for user root by (uid=0)
Jul 08 09:25:01 rockpi CRON[6770]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Jul 08 09:25:01 rockpi CRON[6769]: pam_unix(cron:session): session closed for user root

1 个答案:

答案 0 :(得分:0)

好,我知道了。这个堆栈溢出的答案使我朝着正确的方向前进。

dpkg : how to ignore error in post/pre scripts

我刚刚取消评论重新启动部分并修复了安装。

sudo nano /var/lib/dpkg/info/openmediavault.postinst


########################################################################
                # Restart services when the package is installed.

########################################################################
                if [ -z "$2" ]; then
                        echo "Restarting services ..."
                        deb-systemd-invoke restart cron.service || :
                        deb-systemd-invoke restart watchdog.service || :
                        deb-systemd-invoke restart rrdcached.service || :
                        deb-systemd-invoke restart collectd.service || :
                        deb-systemd-invoke restart php7.0-fpm.service || :
                        deb-systemd-invoke restart nginx.service || :
                        deb-systemd-invoke restart monit.service || :
                        deb-systemd-invoke restart avahi-daemon.service || :
                        deb-systemd-invoke restart ssh.service || :
                fi

然后再次运行dpkg即可。但是,我建议重新启动,因为重新启动服务可能会引起强烈的反响。另外,我稍后再也不会对此部分发表评论。