uucp: opkg works on files and not directories. Create /var/spool/uucp in postinst

Create the spool directory in the post install in case it does
not exist yet. Use the -m 0770 to begin with the right default
for this directory.
This commit is contained in:
Holger Hans Peter Freyther 2013-08-17 19:14:10 +02:00
parent 4f6d4893ce
commit 8fab0f3222
1 changed files with 6 additions and 5 deletions

View File

@ -3,7 +3,7 @@ HOMEPAGE = "http://www.airs.com/ian/uucp.html"
SECTION = "console/utils"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
PR = "r3.4"
PR = "r3.5"
inherit autotools
@ -17,15 +17,16 @@ do_configure() {
EXTRA_OECONF = "--with-newconfigdir=/etc/uucp"
do_install_append() {
install -d ${D}/var/spool/uucp
}
pkg_postinst_${PN} () {
if [ "x$D" != "x" ] ; then
exit 1
fi
# Create the UUCP directory if it does not exist
if [ ! -e /var/spool/uucp ] ; then
mkdir -m 0770 /var/spool/uucp
fi
chown uucp:uucp /var/spool/uucp
chmod 770 /var/spool/uucp
}