diff options
author | Ermal <eri@pfsense.org> | 2010-03-17 14:17:10 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-03-17 14:17:10 +0000 |
commit | a45e27ba70e30d67e380da33f332cd686441788c (patch) | |
tree | 650c4238e46ef064ad220c564adcea5c6dd27823 /etc/inc/util.inc | |
parent | 2ae24c22b8cadc261721425c629a10b604f5070e (diff) | |
download | pfsense-a45e27ba70e30d67e380da33f332cd686441788c.zip pfsense-a45e27ba70e30d67e380da33f332cd686441788c.tar.gz |
Ticket #417. Fix installation on embedded by using a refcount system for the mount command.
Diffstat (limited to 'etc/inc/util.inc')
-rw-r--r-- | etc/inc/util.inc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc index 81051f3..79d6f4b 100644 --- a/etc/inc/util.inc +++ b/etc/inc/util.inc @@ -149,7 +149,11 @@ function refcount_init($reference) { } function refcount_reference($reference) { - $shmid = shmop_open($reference, "w", 0644, 10); + $shmid = @shmop_open($reference, "w", 0644, 10); + if (!$shmid) { + refcount_init($reference); + $shmid = shmop_open($reference, "w", 0644, 10); + } $shm_data = shmop_read($shmid, 0, 10); $shm_data = intval($shm_data) + 1; shmop_write($shmid, $shm_data, 0); |