FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.

» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux General Discussion

LinkBack Thread Tools
Old 08-31-2012, 06:19 PM
Dimitrios Apostolou
Default moving custom hooks to systemd

Hello list,

I tried booting with systemd and two custom hooks I have that create the
/var directory on tmpfs didn't work. Google doesn't help here and my
experience with systemd is in its infancy, so is there specific action I
should take?

My custom hooks are set to run during sysinit_postmount and
shutdown_preumount, see attached file for full source.

Thanks in advance,
function varsync_start ()
# Assuming that we mounted /var as tmpfs in the previous step
stat_busy "Rsyncing /var-sync/ to /var/"
/usr/bin/rsync -ax /var-sync/ /var/

function varsync_stop ()
# saving the /var filesystem from the tmpfs
echo -e 'y
y' | /usr/bin/pacman -Scc >/dev/null
stat_busy "Rsyncing /var/ to /var-sync/"
/usr/bin/rsync -ax --delete /var/ /var-sync/

add_hook sysinit_postmount varsync_start
add_hook shutdown_preumount varsync_stop

Thread Tools

All times are GMT. The time now is 01:39 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org