aboutsummaryrefslogtreecommitdiff
path: root/multihome.h
blob: 55ab6ce0ca6567eec2057fec380ca5baf62bce67 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//
// Created by jhunk on 8/26/20.
//

#ifndef MULTIHOME_MULTIHOME_H
#define MULTIHOME_MULTIHOME_H

#ifdef ENABLE_TESTING
#include <assert.h>
#endif

#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <limits.h>
#include <pwd.h>
#include <sys/utsname.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <libgen.h>
#include <wait.h>
#include <argp.h>
#include <time.h>
#include "config.h"

#define VERSION "0.0.1"
#define MULTIHOME_ROOT "home_local"
#define MULTIHOME_TOPDIR "topdir"
#define MULTIHOME_CFGDIR ".multihome"
#define MULTIHOME_CFG_TRANSFER "transfer"
#define MULTIHOME_CFG_INIT "init"
#define MULTIHOME_CFG_SKEL "skel/"  // NOTE: Trailing slash is required
#define MULTIHOME_MARKER ".multihome_controlled"
#define OS_SKEL_DIR "/etc/skel/"    // NOTE: Trailing slash is required
#define RSYNC_ARGS "-aq"
#define COPY_NORMAL 0
#define COPY_UPDATE 1

#define DISABLE_BUFFERING \
    setvbuf(stdout, NULL, _IONBF, 0); \
    setvbuf(stderr, NULL, _IONBF, 0);

#endif //MULTIHOME_MULTIHOME_H