From 3e9ec53de493008059ee2ba4182a77273a79f500 Mon Sep 17 00:00:00 2001 From: Brett Carrington Date: Wed, 31 Dec 2003 20:21:00 +0000 Subject: [PATCH] I renamed it to 'bannerfile', 'banfile' is ambigous (perhaps for a future banner users file?) Also made LOC_BANNER in the header and updated the chroot script to include the banner and default-rc files. git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@25 db0b04b0-f4d1-0310-9a6d-de3e77497b0e --- dgamelaunch.c | 8 ++++---- dgamelaunch.h | 2 +- dgl-create-chroot | 5 +++++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/dgamelaunch.c b/dgamelaunch.c index 752b086..2653f1e 100644 --- a/dgamelaunch.c +++ b/dgamelaunch.c @@ -160,14 +160,14 @@ catch_sighup () void loadbanner (struct dg_banner *ban) { - FILE *banfile; + FILE *bannerfile; char buf[80]; memset (buf, 0, 80); - banfile = fopen ("/dgl-banner", "r"); + bannerfile = fopen (LOC_BANNER, "r"); - if (!banfile) + if (!bannerfile) { ban->len = 2; ban->lines = malloc (sizeof (char *)); @@ -182,7 +182,7 @@ loadbanner (struct dg_banner *ban) ban->len = 0; - while (fgets (buf, 80, banfile) != NULL) + while (fgets (buf, 80, bannerfile) != NULL) { char *loc; diff --git a/dgamelaunch.h b/dgamelaunch.h index 9c083cb..c38eba3 100644 --- a/dgamelaunch.h +++ b/dgamelaunch.h @@ -30,5 +30,5 @@ struct dg_banner #define LOC_INPROGRESSDIR LOC_DGLROOT "inprogress/" #define LOC_SPOOLDIR "/var/mail" #define LOC_CANNED "/dgl-default-rcfile" - +#define LOC_BANNER "/dgl-banner" #endif diff --git a/dgl-create-chroot b/dgl-create-chroot index 66ebb56..d9c7f8f 100755 --- a/dgl-create-chroot +++ b/dgl-create-chroot @@ -29,6 +29,11 @@ chown -R $CHROOT_UID:$CHROOT_GID $CHROOT_PATH/dgldir chown -R $CHROOT_UID:$CHROOT_GID $CHROOT_PATH/var/mail touch $CHROOT_PATH/dgl-login touch $CHROOT_PATH/dgl-lock + +# Might want to remove these two for packaging? +cp dgl-default-rcfile $CHROOT_PATH/ +cp dgl-banner $CHROOT_PATH/ + chown $CHROOT_UID:$CHROOT_GID $CHROOT_PATH/dgl-* # Needs gzip to compress