mirror of https://github.com/cutefishos/appmotor
[mapplauncherd] Fixes MER#1916
Signed-off-by: Aleksey Mikhaylov <a.mikhaylov@omprussia.ru>pull/1/head
parent
6e72366257
commit
2442117654
@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Booster cgroup mounting service
|
||||
Before=systemd-user-sessions.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/lib/startup/booster-cgroup-mount
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
|
||||
CGDIR="/sys/fs/cgroup"
|
||||
|
||||
# precondition: cgroup mount must exist
|
||||
mountpoint -q $CGDIR || exit 1
|
||||
|
||||
# create booster directory
|
||||
if [ ! -d $CGDIR/booster ]; then
|
||||
FAIL=1
|
||||
if mount -o remount,rw $CGDIR; then
|
||||
if mkdir $CGDIR/booster; then
|
||||
FAIL=0
|
||||
fi
|
||||
if ! mount -o remount,ro $CGDIR; then
|
||||
FAIL=1
|
||||
fi
|
||||
fi
|
||||
[ $FAIL = 0 ] || exit 1
|
||||
fi
|
||||
|
||||
# mount booster directory
|
||||
if ! mountpoint -q $CGDIR/booster; then
|
||||
mount -t cgroup -o none,name=booster cgroup $CGDIR/booster || exit 1
|
||||
fi
|
||||
|
||||
# adjust booster directory permissions
|
||||
FAIL=0
|
||||
chown -R root:privileged $CGDIR/booster || FAIL=1
|
||||
chmod 0774 $CGDIR/booster || FAIL=1
|
||||
exit $FAIL
|
||||
Loading…
Reference in New Issue