-
Notifications
You must be signed in to change notification settings - Fork 6
/
aleph.context
67 lines (57 loc) · 2.07 KB
/
aleph.context
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/sh.before
parents=$(pid=$$; while [ $pid -ne 1 ]; do pid=$(ps -o ppid= -p $pid); cat /proc/$(echo $pid)/cmdline; done)
if ! echo $parents | grep -q amiconfig; then
echo "Skipping startup script, which should only run under amiconfig daemon"
exit 0
fi
# EOS directories
mkdir -p /eos
chown -R ganis:sf /eos
# Script to mount EOS
cat << EOFOUTER > /usr/bin/mount-eos
#!/bin/sh
# EOS server
export EOS_MGM_URL=root://eospublic.cern.ch
if test ! "x$1" = "x" ; then
export EOS_MGM_URL=$1
fi
# mount
eos fuse mount /eos
EOFOUTER
chmod 0755 /usr/bin/mount-eos
cat << EOFOUTER > /usr/bin/aleph-shell
#!/bin/sh
TMPRC=\$(mktemp)
cat > \$TMPRC << EOF
PS1='\[\e]2;aleph shell\a\]\[\e[1;32m\]aleph shell >\[\e[m\]\[\e[0;32m\] '
EOF
echo 'HISTFILE=~/.aleph_history' >> \$TMPRC
# echo '. /cvmfs/cms.cern.ch/cmsset_default.sh' >> \$TMPRC
cvmfs_config probe
echo "Starting up ALEPH shell..."
singularity exec -B /usr/share/X11/xkb/rules -B /etc/cvmfs -B /cvmfs -B /eos /cvmfs/cernvm-slc4.cern.ch/cvm3 /bin/bash --noprofile --rcfile \$TMPRC
rm -f \$TMPRC
EOFOUTER
chmod 0755 /usr/bin/aleph-shell
# Avoid xroot client warnings
touch /etc/profile.d/xrootd-protocol.sh
echo '
export XrdSecPROTOCOL=unix
' > /etc/profile.d/xrootd-protocol.sh
exit 0
[cernvm]
repositories=sft.cern.ch,aleph.cern.ch
shell=/bin/bash
config_url=http://cernvm.cern.ch/config
eos-server=root://eospublic.cern.ch
users=ganis:sf:$6$WIjSh7.v$jgTz4226ZKro4B1TmeMjWr09LYgKG0qzNIp.iWFAdoJVb4Vgsierq/q0q.fAUbCOB.r1U10SKrMy6EBqZ6aCj/
edition=Desktop
screenRes=1280x700
keyboard=us
startXDM=on
auto_login=on
# desktop_icons=CMS~OpenData,W0Rlc2t0b3AgRW50cnldClZlcnNpb249MS4wCkVuY29kaW5nPVVURi04ClR5cGU9TGluawpOYW1lPVJlYWQgTWUKQ29tbWVudD0KSWNvbj0vdXNyL3NoYXJlL2ljb25zL2Ntcy5qcGcKVVJMPWh0dHA6Ly9vcGVuZGF0YS5jZXJuLmNoL1ZNL0NNUwpHZW5lcmljTmFtZT0K%CMS~Shell,W0Rlc2t0b3AgRW50cnldClZlcnNpb249MS4wClR5cGU9QXBwbGljYXRpb24KTmFtZT1DTVMgU2hlbGwKQ29tbWVudD0KRXhlYz0vdXNyL2Jpbi9jbXMtc2hlbGwKSWNvbj11dGlsaXRpZXMtdGVybWluYWwKUGF0aD0KVGVybWluYWw9dHJ1ZQpTdGFydHVwTm90aWZ5PWZhbHNlCg==
[ucernvm-begin]
cvmfs_branch=cernvm-sl7.cern.ch
cvmfs_server=hepvm.cern.ch
[ucernvm-end]