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
This commit is contained in:
Brett Carrington 2003-12-31 20:21:00 +00:00
parent 8b0af2e9aa
commit 3e9ec53de4
3 changed files with 10 additions and 5 deletions

View File

@ -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;

View File

@ -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

View File

@ -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