From 96b74ca2d96fb3b143630bafb5613be4484007f2 Mon Sep 17 00:00:00 2001 From: Gardais Jeremy Date: Tue, 30 Jan 2018 17:55:49 +0100 Subject: [PATCH] Avoid "cp cannot stat" issue by moving wildcard outside the variable. --- scripts/latecommand.tar.gz | Bin 4136 -> 4679 bytes scripts/latecommand/post.sh | 12 ++++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/latecommand.tar.gz b/scripts/latecommand.tar.gz index 73ac4d307cdb5754f4784f7991cec1e71d8835ca..b2dd4f5a4b36ac3b821a87a98daa41f523ce1211 100644 GIT binary patch literal 4679 zcmV-N61eRjiwFR=qi|XP1MNL)Z`(+c`8xa+y;6X+4bu`OQo2o$J9y({)|kWzY-jfl zcZYx`TM|bko6ARRZ6?6|n)_k*ORlP$?}tdovNGAQfJ72m)m{CluBxu;wylTMV2-1^ z=IF^I!5Cn!Y4|x&=Su!FfhWpzGF262HdE$L#>!MxXHSUsSPbPM3PRl{=h{$X@uxuakuNvH3x zKfZi-@%rQW#mhGz&R%`Ix_tR!@btj6d{=iUc{)BE1))zvV>N>RM!FZ`zY~MGixYD+ zs21@4^!hI^2KC6&<<);&y?OWZnILJY%MUhz&6b>eP$JFM(ty^nK?yaoSD~$`g*O9` zF5g|BUcc(p4j}Vc2r?J5Sfb8V(u~=$HCX}3XO+CRF5aXefsrCut+kANJ+zohK7am< zFQ^+tJ|!U|EBzBC0fUN7y3ixLOt4@+IrT!x@Q5sv!PC!m)9cINsP+}|_Jwou<;xfN z7?St8vDTL~NEnGc6Zj=Qg+nQy@>Si^`H<4M>AfyBSc8?uOOTaLV?ubUK$cvaJu z8$Ga$Vj)0jxv)ssHg<~@MkdfW(H;2*3eAvQQilQg#p^51fbSU~P^OgP0=+L#+(jVc zS_{3CU_sM{9o{P57zR+r>?P*tOfZ`f&=cYmqfPn?+yp#zn_zEMP2Eq zA$g0G$*9~i-?XhD#CF0o@hwAl$qj|!p$T8uw6w`T1=OZSD97}2N-xU+O&`BVij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CJ;XYt;?GF*TM7}^U?Z6B51&qRq+IXnfEo8$R_rKrA9?(UF z0AAZ`!Vy_pYN!(ckmEMF&>97J&t?F?|Wh9D#RA1kj&wg3PC diff --git a/scripts/latecommand/post.sh b/scripts/latecommand/post.sh index a771d61..c196dfd 100755 --- a/scripts/latecommand/post.sh +++ b/scripts/latecommand/post.sh @@ -1,22 +1,22 @@ #!/bin/sh -APT_CONF_INCLUDE_SRC="$(dirname $0)/stretch/etc/apt/apt.conf.d/*" +APT_CONF_INCLUDE_SRC="$(dirname $0)/stretch/etc/apt/apt.conf.d/" APT_CONF_INCLUDE_PATH="/etc/apt/apt.conf.d/" RSYSLOGD_CONF_SRC="$(dirname $0)/stretch/etc/rsyslog.conf" RSYSLOGD_CONF_PATH="/etc/rsyslog.conf" -RSYSLOGD_INCLUDE_SRC="$(dirname $0)/stretch/etc/rsyslog.d/*" +RSYSLOGD_INCLUDE_SRC="$(dirname $0)/stretch/etc/rsyslog.d/" RSYSLOGD_INCLUDE_PATH="/etc/rsyslog.d/" LOGROTATE_CONF_SRC="$(dirname $0)/stretch/etc/logrotate.conf" LOGROTATE_CONF_PATH="/etc/logrotate.conf" -LOGROTATE_INCLUDE_SRC="$(dirname $0)/stretch/etc/logrotate.d/*" +LOGROTATE_INCLUDE_SRC="$(dirname $0)/stretch/etc/logrotate.d/" LOGROTATE_INCLUDE_PATH="/etc/logrotate.d/" # apt configuration {{{ # ensure to have some default configuration for Apt -cp -- "${APT_CONF_INCLUDE_SRC}" "${APT_CONF_INCLUDE_PATH}" +cp -- "${APT_CONF_INCLUDE_SRC}"* "${APT_CONF_INCLUDE_PATH}" # }}} @@ -84,7 +84,7 @@ fi if [ -f "${RSYSLOGD_CONF_PATH}" ]; then cp "${RSYSLOGD_CONF_SRC}" "${RSYSLOGD_CONF_PATH}" fi -cp -- "${RSYSLOGD_INCLUDE_SRC}" "${RSYSLOGD_INCLUDE_PATH}" +cp -- "${RSYSLOGD_INCLUDE_SRC}"* "${RSYSLOGD_INCLUDE_PATH}" # Restart Rsyslog service systemctl restart rsyslog @@ -97,7 +97,7 @@ systemctl restart rsyslog if [ -f "${LOGROTATE_CONF_PATH}" ]; then cp "${LOGROTATE_CONF_SRC}" "${LOGROTATE_CONF_PATH}" fi -cp -- "${LOGROTATE_INCLUDE_SRC}" "${LOGROTATE_INCLUDE_PATH}" +cp -- "${LOGROTATE_INCLUDE_SRC}"* "${LOGROTATE_INCLUDE_PATH}" # Create an archive directory for some log files (aptitude, dpkg,…) mkdir -p -- /var/log/old_logs.d /var/log/aptitude.d /var/log/dpkg.d /var/log/alternatives.d /var/log/syslog.d /var/log/cron.d /var/log/daemon.d /var/log/kern.d /var/log/lpr.d /var/log/mail.d /var/log/auth.d /var/log/messages.d