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
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 *));
ban->len = 0;
- while (fgets (buf, 80, banfile) != NULL)
+ while (fgets (buf, 80, bannerfile) != NULL)
{
char *loc;
#define LOC_INPROGRESSDIR LOC_DGLROOT "inprogress/"
#define LOC_SPOOLDIR "/var/mail"
#define LOC_CANNED "/dgl-default-rcfile"
-
+#define LOC_BANNER "/dgl-banner"
#endif
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